From: Douglas Bagnall Date: Thu, 2 May 2019 22:23:56 +0000 (+1200) Subject: rpc/dns: reduce the CID count on temporary variables X-Git-Tag: tdb-1.4.1~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51e4a1e45407ead0cb7753237670620bee6eee2d;p=thirdparty%2Fsamba.git rpc/dns: reduce the CID count on temporary variables CID 1363189 and others. Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer --- diff --git a/source4/rpc_server/dnsserver/dnsdata.c b/source4/rpc_server/dnsserver/dnsdata.c index 178ed7c51b1..2dc098a64a0 100644 --- a/source4/rpc_server/dnsserver/dnsdata.c +++ b/source4/rpc_server/dnsserver/dnsdata.c @@ -778,6 +778,7 @@ struct dns_tree *dns_build_tree(TALLOC_CTX *mem_ctx, const char *name, struct ld root = dns_tree_init(mem_ctx, nlist[rootcount-1], NULL); if (root == NULL) { + talloc_free(nlist); return NULL; } @@ -849,6 +850,7 @@ struct dns_tree *dns_build_tree(TALLOC_CTX *mem_ctx, const char *name, struct ld return root; failed: + talloc_free(nlist); talloc_free(root); return NULL; }