From: Arne Redlich Date: Mon, 17 Feb 2014 23:19:23 +0000 (+0100) Subject: nfs_mkdir_async: fix potential memory leak X-Git-Tag: upstream/1.9.6^2~93 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b1a197f5b2bf091a95811b1db9560110509d40bb;p=deb_libnfs.git nfs_mkdir_async: fix potential memory leak Pointed out by clang analyzer Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index c660db3..6f0a0ae 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -2124,6 +2124,7 @@ int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void * ptr = strrchr(new_path, '/'); if (ptr == NULL) { + free(new_path); rpc_set_error(nfs->rpc, "Invalid path %s", path); return -1; }