From: Martin Schwenke Date: Mon, 17 Aug 2020 10:27:18 +0000 (+1000) Subject: ctdb-recoverd: Fix a local memory leak X-Git-Tag: samba-4.11.14~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e52bb0c5c613b5e4b141b8268f1e10fe66a9c18;p=thirdparty%2Fsamba.git ctdb-recoverd: Fix a local memory leak The memory is allocated off the memory context used by the current iteration of main loop. It is freed when main loop completes the fix doesn't require backporting to stable branches. However, it is sloppy so it is worth fixing. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit d2d90f250214582d7124b8137aa2cf5032b2f285) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 7845a457efe..2519e93dcfc 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -2261,6 +2261,7 @@ static int get_remote_nodemaps(struct ctdb_context *ctdb, async_getnodemap_callback, NULL, remote_nodemaps); + talloc_free(nodes); return ret; }