svn commit: samba r13881 - in trunk/source/nmbd: .
jra at samba.org
jra at samba.org
Mon Mar 6 19:24:06 GMT 2006
Author: jra
Date: 2006-03-06 19:24:04 +0000 (Mon, 06 Mar 2006)
New Revision: 13881
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13881
Log:
Fix coverity bug CID #97, mem leak on error path.
Jeremy.
Modified:
trunk/source/nmbd/nmbd_winsproxy.c
Changeset:
Modified: trunk/source/nmbd/nmbd_winsproxy.c
===================================================================
--- trunk/source/nmbd/nmbd_winsproxy.c 2006-03-06 19:23:54 UTC (rev 13880)
+++ trunk/source/nmbd/nmbd_winsproxy.c 2006-03-06 19:24:04 UTC (rev 13881)
@@ -85,6 +85,10 @@
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 @@
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
More information about the samba-cvs
mailing list