From: Andrew Bartlett Date: Fri, 27 Mar 2020 03:10:44 +0000 (+1300) Subject: dlz_bind9: Avoid talloc_new(NULL), use a parent variable X-Git-Tag: ldb-2.2.0~1138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f9b80c79a207d8d6d4ad3cdc671e23ec8392c67;p=thirdparty%2Fsamba.git dlz_bind9: Avoid talloc_new(NULL), use a parent variable This will help provide a better memory tree if we ever suspect a problem here. The tmp_ctx varaible is always freed before the end of this function. Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c index 9e4a3695866..f2c93c21af5 100644 --- a/source4/dns_server/dlz_bind9.c +++ b/source4/dns_server/dlz_bind9.c @@ -1575,7 +1575,7 @@ _PUBLIC_ isc_boolean_t dlz_ssumatch(const char *signer, const char *name, const state->update_name = NULL; } - tmp_ctx = talloc_new(NULL); + tmp_ctx = talloc_new(state); if (tmp_ctx == NULL) { state->log(ISC_LOG_ERROR, "samba_dlz: no memory"); result = ISC_FALSE;