summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-06 19:23:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:58 -0500
commitcc6b2d086adab2e08e0e021079f734fbd1ace3cc (patch)
tree7d42a78d140dfc595a8d3e73a2b6b7804dfec7a9 /source3/nmbd
parent129fd6c5c641cf4c2db31eb093baebd08df63107 (diff)
downloadsamba-cc6b2d086adab2e08e0e021079f734fbd1ace3cc.tar.gz
samba-cc6b2d086adab2e08e0e021079f734fbd1ace3cc.tar.bz2
samba-cc6b2d086adab2e08e0e021079f734fbd1ace3cc.zip
r13880: Fix coverity bug CID #97, mem leak on error path.
Jeremy. (This used to be commit 0dc37dd2d85d59e7287cebcb7019194cf6754074)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_winsproxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c
index a31eb1e2a6..a66290da6c 100644
--- a/source3/nmbd/nmbd_winsproxy.c
+++ b/source3/nmbd/nmbd_winsproxy.c
@@ -85,6 +85,10 @@ returned for name %s.\n", nmb_namestr(nmbname) ));
nmbname->name_type, nb_flags, ttl,
WINS_PROXY_NAME, num_ips, iplist );
+ if(iplist != &ip) {
+ SAFE_FREE(iplist);
+ }
+
namerec = find_name_on_subnet(orig_broadcast_subnet, nmbname, FIND_ANY_NAME);
if (!namerec) {
DEBUG(0,("wins_proxy_name_query_request_success: failed to add "
@@ -94,10 +98,6 @@ returned for name %s.\n", nmb_namestr(nmbname) ));
return;
}
- if(iplist != &ip) {
- SAFE_FREE(iplist);
- }
-
/*
* Check that none of the IP addresses we are returning is on the
* same broadcast subnet as the original requesting packet. If it