From: Arne Redlich Date: Mon, 17 Feb 2014 22:09:31 +0000 (+0100) Subject: nfs_mknod_async: plug potential memory leak X-Git-Tag: upstream/1.9.6^2~103 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=feb2fc2f92950ddefc2ddd6994e38ef8d9f13eb9;p=deb_libnfs.git nfs_mknod_async: plug potential memory leak Pointed out by clang analyzer. Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index 6e7cd21..64f7fe4 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -2592,6 +2592,7 @@ int nfs_mknod_async(struct nfs_context *nfs, const char *path, int mode, int dev ptr = strrchr(cb_data->path, '/'); if (ptr == NULL) { rpc_set_error(nfs->rpc, "Invalid path %s", path); + free_mknod_cb_data(cb_data); return -1; } *ptr = 0;