git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ab9f61
)
r20604: Fix two memleaks, Coverity ID 337, merge to 3_0_24
author
Volker Lendecke
<vlendec@samba.org>
Mon, 8 Jan 2007 08:09:29 +0000
(08:09 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:16:57 +0000
(12:16 -0500)
(This used to be commit
44f9d25a9026df29fcaae8723ef52b1d3101628b
)
source3/libsmb/namequery.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/namequery.c
b/source3/libsmb/namequery.c
index 13d3517cdd6961a690ac1af57d6173b72490cf27..065bb810c5e193697c7f40c1d9a52c6aa720e989 100644
(file)
--- a/
source3/libsmb/namequery.c
+++ b/
source3/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;
}