nfs_mknod_async: fix use-after-free
[deb_libnfs.git] / lib / libnfs.c
index 910e4d2cc5a1b054a22d4df4dcd9789324c96b6f..c660db3ecf11211c732003e2abb686459b01c5c0 100644 (file)
@@ -2594,7 +2594,6 @@ int nfs_mknod_async(struct nfs_context *nfs, const char *path, int mode, int dev
        /* data->path now points to the parent directory,  and beyond the nul terminateor is the new directory to create */
        if (nfs_lookuppath_async(nfs, cb_data->path, cb, private_data, nfs_mknod_continue_internal, cb_data, free_mknod_cb_data, 0) != 0) {
                rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components");
-               free_mknod_cb_data(cb_data);
                return -1;
        }