diff options
author | Volker Lendecke <vl@samba.org> | 2011-06-19 11:26:55 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-06-19 12:40:55 +0200 |
commit | bc3261f0c52847515bfdc35856f903c3be61c72e (patch) | |
tree | 0784abc6bd7a49f72c6073f57bf4b56d49856324 | |
parent | 763941f2456f6c50581a1fa54aaba810a2b9efd1 (diff) | |
download | samba-bc3261f0c52847515bfdc35856f903c3be61c72e.tar.gz samba-bc3261f0c52847515bfdc35856f903c3be61c72e.tar.bz2 samba-bc3261f0c52847515bfdc35856f903c3be61c72e.zip |
s3: Fix a memleak in name_resolve_bcast
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 12:40:55 CEST 2011 on sn-devel-104
-rw-r--r-- | source3/libsmb/namequery.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index dc062fb0a0..988840ad94 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1768,6 +1768,7 @@ NTSTATUS name_resolve_bcast(const char *name, { struct sockaddr_storage *bcast_addrs; int i, num_addrs, num_bcast_addrs; + NTSTATUS status; if (lp_disable_netbios()) { DEBUG(5,("name_resolve_bcast(%s#%02x): netbios is disabled\n", @@ -1805,10 +1806,12 @@ NTSTATUS name_resolve_bcast(const char *name, num_bcast_addrs += 1; } - return name_queries(name, name_type, true, true, - bcast_addrs, num_bcast_addrs, 0, 1000, - mem_ctx, return_iplist, return_count, - NULL, NULL); + status = name_queries(name, name_type, true, true, + bcast_addrs, num_bcast_addrs, 0, 1000, + mem_ctx, return_iplist, return_count, + NULL, NULL); + TALLOC_FREE(bcast_addrs); + return status; } struct query_wins_list_state { |