]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dlz_bind9: Avoid talloc_new(NULL), use a parent variable
authorAndrew Bartlett <abartlet@samba.org>
Fri, 27 Mar 2020 03:10:44 +0000 (16:10 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 1 Apr 2020 08:51:31 +0000 (08:51 +0000)
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 <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/dns_server/dlz_bind9.c

index 9e4a3695866351fef3ca3ec6ad0342323f4c5cfe..f2c93c21af58a655b4fca45b65222db5cf061ab0 100644 (file)
@@ -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;