nfsdirent->name = strdup(entry->name);
if (nfsdirent->name == NULL) {
data->cb(-ENOMEM, nfs, "Failed to allocate dirent->name", data->private_data);
+ free(nfsdirent);
nfs_free_nfsdir(nfsdir);
data->continue_data = NULL;
free_nfs_cb_data(data);
* commands in flight to complete
*/
if (rdpe_cb_data->getattrcount > 0) {
+ nfs_free_nfsdir(nfsdir);
+ data->continue_data = NULL;
+ free_nfs_cb_data(data);
rdpe_cb_data->status = RPC_STATUS_ERROR;
free(rdpe_lookup_cb_data);
return;
}
}
-
static void nfs_opendir_cb(struct rpc_context *rpc, int status, void *command_data, void *private_data)
{
READDIRPLUS3res *res = command_data;