diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-17 20:09:45 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-18 15:25:03 +0200 |
commit | 0264c0c337058c03f9b4aca915f6af5e6a7731b0 (patch) | |
tree | 56e594ad73b5066035d64b25a4e64fb1f42ed334 /source3 | |
parent | 36e57fa728fc98102d3f40d4341d22e6beb3802a (diff) | |
download | samba-0264c0c337058c03f9b4aca915f6af5e6a7731b0.tar.gz samba-0264c0c337058c03f9b4aca915f6af5e6a7731b0.tar.bz2 samba-0264c0c337058c03f9b4aca915f6af5e6a7731b0.zip |
s3: Fix a memleak in discover_dc_netbios
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/dsgetdcname.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index 6e67e050fe..1e1eac33b3 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -497,6 +497,7 @@ static NTSTATUS discover_dc_netbios(TALLOC_CTX *mem_ctx, dclist = TALLOC_ZERO_ARRAY(mem_ctx, struct ip_service_name, count); if (!dclist) { + SAFE_FREE(iplist); return NT_STATUS_NO_MEMORY; } @@ -512,6 +513,7 @@ static NTSTATUS discover_dc_netbios(TALLOC_CTX *mem_ctx, r->port = iplist[i].port; r->hostname = talloc_strdup(mem_ctx, addr); if (!r->hostname) { + SAFE_FREE(iplist); return NT_STATUS_NO_MEMORY; } @@ -519,6 +521,7 @@ static NTSTATUS discover_dc_netbios(TALLOC_CTX *mem_ctx, *returned_dclist = dclist; *returned_count = count; + SAFE_FREE(iplist); return NT_STATUS_OK; } |