]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Fix CID 1465656 Resource leak
authorVolker Lendecke <vl@samba.org>
Wed, 5 Aug 2020 14:22:10 +0000 (16:22 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 6 Aug 2020 20:23:53 +0000 (20:23 +0000)
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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  6 20:23:53 UTC 2020 on sn-devel-184

source3/libsmb/namequery.c

index 0e87df296907cd6152a664867507b21ec8deac38..734d921372c0181d510ecc4915f7ad0e5698625d 100644 (file)
@@ -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;
        }