From: Arne Redlich Date: Mon, 17 Feb 2014 22:53:38 +0000 (+0100) Subject: nfs_mknod_async: fix use-after-free X-Git-Tag: upstream/1.9.6^2~94 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ecc656491ab12ad0fab36727a9a71751448b148c;p=deb_libnfs.git nfs_mknod_async: fix use-after-free Spotted by clang analyzer Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index 910e4d2..c660db3 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -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; }