From: Volker Lendecke Date: Wed, 5 Aug 2020 14:22:10 +0000 (+0200) Subject: libsmb: Fix CID 1465656 Resource leak X-Git-Tag: talloc-2.3.2~916 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04b2db7d885a233276f271116040ee58669dd69e;p=thirdparty%2Fsamba.git libsmb: Fix CID 1465656 Resource leak This is very likely a false positive, because Coverity does not see that we only assign "dns_addrs" when NT_STATUS_IS_OK(status), so we might not want this. But it is a fresh finding and looks cleaner this way. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Aug 6 20:23:53 UTC 2020 on sn-devel-184 --- diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 0e87df29690..734d921372c 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -2649,6 +2649,7 @@ static NTSTATUS resolve_ads(TALLOC_CTX *ctx, TALLOC_FREE(dcs); TALLOC_FREE(srv_addrs); TALLOC_FREE(dns_lookup_names); + TALLOC_FREE(dns_addrs); return status; }