Do an early TALLOC_FREE
authorVolker Lendecke <vl@samba.org>
Tue, 25 Aug 2009 15:02:53 +0000 (17:02 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 25 Aug 2009 15:38:31 +0000 (17:38 +0200)
source3/libads/dns.c

index 5cf768de67241decbfe4f3ac42c81f35b5ae11d6..0797eb1156f5f26cb892fe13bff4f74fc4a18f04 100644 (file)
@@ -985,7 +985,7 @@ NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
        /*_ldap._tcp.DomainGuid.domains._msdcs.DnsForestName */
 
        const char *domains;
-       const char *guid_string;
+       char *guid_string;
 
        guid_string = GUID_string(ctx, domain_guid);
        if (!guid_string) {
@@ -997,6 +997,7 @@ NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
        if (!domains) {
                return NT_STATUS_NO_MEMORY;
        }
+       TALLOC_FREE(guid_string);
 
        return ads_dns_query_internal(ctx, "_ldap", domains, dns_forest_name,
                                      NULL, dclist, numdcs);