From 2257433dd4871b4d2323d92e5800931c6821b143 Mon Sep 17 00:00:00 2001 From: Arne Redlich Date: Tue, 18 Feb 2014 00:20:59 +0100 Subject: [PATCH] nfs_rmdir_async: fix potential memory leak 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 6f0a0ae..b26472c 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -2211,6 +2211,7 @@ int nfs_rmdir_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; } -- 2.34.1