summaryrefslogtreecommitdiffstats
path: root/source/libsmb/namequery.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-08 08:09:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:57 -0500
commit44f9d25a9026df29fcaae8723ef52b1d3101628b (patch)
tree1f3781da8dc3d7c4e24148b429a97ef41f08a97f /source/libsmb/namequery.c
parente4dea0e64747912da899e846b944c24804772259 (diff)
downloadsamba-44f9d25a9026df29fcaae8723ef52b1d3101628b.tar.gz
samba-44f9d25a9026df29fcaae8723ef52b1d3101628b.tar.xz
samba-44f9d25a9026df29fcaae8723ef52b1d3101628b.zip
r20604: Fix two memleaks, Coverity ID 337, merge to 3_0_24
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r--source/libsmb/namequery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index 13d3517cdd6..065bb810c5e 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -1507,6 +1507,7 @@ static NTSTATUS get_dc_list(const char *domain, struct ip_service **ip_list,
if ( (num_addresses == 0) ) {
if ( done_auto_lookup ) {
DEBUG(4,("get_dc_list: no servers found\n"));
+ SAFE_FREE(auto_ip_list);
return NT_STATUS_NO_LOGON_SERVERS;
}
if (internal_resolve_name(domain, 0x1C, ip_list, count,
@@ -1519,6 +1520,7 @@ static NTSTATUS get_dc_list(const char *domain, struct ip_service **ip_list,
if ( (return_iplist = SMB_MALLOC_ARRAY(struct ip_service, num_addresses)) == NULL ) {
DEBUG(3,("get_dc_list: malloc fail !\n"));
+ SAFE_FREE(auto_ip_list);
return NT_STATUS_NO_MEMORY;
}