wbinfo: Free memory when we leave wbinfo_dsgetdcname()
authorAndreas Schneider <asn@samba.org>
Thu, 9 Aug 2018 13:53:45 +0000 (15:53 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 10 Aug 2018 23:49:16 +0000 (01:49 +0200)
Found by covscan.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13567

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch/wbinfo.c

index 1b58c73..c456f6e 100644 (file)
@@ -747,6 +747,9 @@ static bool wbinfo_dsgetdcname(const char *domain_name, uint32_t flags)
        d_printf("%s\n", dc_info->dc_site_name);
        d_printf("%s\n", dc_info->client_site_name);
 
+       wbcFreeMemory(str);
+       wbcFreeMemory(dc_info);
+
        return true;
 }