From: Noel Power Date: Thu, 10 Sep 2020 15:37:08 +0000 (+0100) Subject: s3/libsmb: cleanup discover_dc_dns() Fix potential leak X-Git-Tag: talloc-2.3.2~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a10a430eb6aeb82e692b7017bb1daa82fd123a4;p=thirdparty%2Fsamba.git s3/libsmb: cleanup discover_dc_dns() Fix potential leak Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index 42db03ac52c..4d037984fc8 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -786,6 +786,9 @@ static NTSTATUS discover_dc_dns(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } + TALLOC_FREE(dcs); + TALLOC_FREE(dclist); + TALLOC_FREE(dns_lookups); return NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; }