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