From: Arne Redlich Date: Mon, 17 Feb 2014 22:11:59 +0000 (+0100) Subject: nfs_creat_async: plug potential memleak X-Git-Tag: upstream/1.9.6^2~102 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a1287496488a3d04e205cb1999e0639768bf5b95;p=deb_libnfs.git nfs_creat_async: plug potential memleak Spotted by clang analyzer. Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index 64f7fe4..969721e 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -2371,6 +2371,7 @@ int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb ptr = strrchr(new_path, '/'); if (ptr == NULL) { rpc_set_error(nfs->rpc, "Invalid path %s", path); + free(new_path); return -1; } *ptr = 0;