diff options
Diffstat (limited to 'source3/libsmb')
-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; } |