From: Arne Redlich Date: Mon, 17 Feb 2014 23:22:45 +0000 (+0100) Subject: nfs_unlink_async: plug potential memory leak X-Git-Tag: upstream/1.9.6^2~91 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bcbb21cdbb66e36fc4ef77559282aaf2242fe7b0;p=deb_libnfs.git nfs_unlink_async: plug potential memory leak Spotted by clang analyzer Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index b26472c..b2502ba 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -2447,6 +2447,7 @@ int nfs_unlink_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; }