If status is non-zero in the mount callback, then the datapointer might be NULL
so we should not dereference it into an exports pointer before we have checked the status.
This would otherwise cause crashes.
void mount_getexports_cb(struct rpc_context *mount_context, int status, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
- exports export = *(exports *)data;
+ exports export;
cb_data->is_finished = 1;
cb_data->status = status;
return;
}
+ export = *(exports *)data;
while (export != NULL) {
exports new_export;