From: Arne Redlich Date: Mon, 17 Feb 2014 22:06:32 +0000 (+0100) Subject: nfs_lookuppath_async: plug potential memleak X-Git-Tag: upstream/1.9.6^2~104 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e59193c9f9ee42265eabd92a8b20e81c6eac2776;p=deb_libnfs.git nfs_lookuppath_async: plug potential memleak Spotted by clang analyzer. Signed-off-by: Arne Redlich --- diff --git a/lib/libnfs.c b/lib/libnfs.c index 61cb29f..6e7cd21 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -1105,6 +1105,8 @@ static int nfs_lookuppath_async(struct nfs_context *nfs, const char *path, nfs_c if (data == NULL) { rpc_set_error(nfs->rpc, "out of memory: failed to allocate " "nfs_cb_data structure"); + if (free_continue_data) + free_continue_data(continue_data); return -1; } memset(data, 0, sizeof(struct nfs_cb_data));