From cc6b2d086adab2e08e0e021079f734fbd1ace3cc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 6 Mar 2006 19:23:54 +0000 Subject: r13880: Fix coverity bug CID #97, mem leak on error path. Jeremy. (This used to be commit 0dc37dd2d85d59e7287cebcb7019194cf6754074) --- source3/nmbd/nmbd_winsproxy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/nmbd') 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 -- cgit