From a1287496488a3d04e205cb1999e0639768bf5b95 Mon Sep 17 00:00:00 2001 From: Arne Redlich Date: Mon, 17 Feb 2014 23:11:59 +0100 Subject: [PATCH] nfs_creat_async: plug potential memleak Spotted by clang analyzer. Signed-off-by: Arne Redlich --- lib/libnfs.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.34.1