summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-15 12:30:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:08 -0500
commit4c7b4cd33aff214879b450e532a091941558727d (patch)
treeeb4a7681cf987b9f8ef4620aa44446af270bbc4c
parentbfc2bf8178097425cba2cdf2afe2c7a835c46057 (diff)
downloadsamba-4c7b4cd33aff214879b450e532a091941558727d.tar.gz
samba-4c7b4cd33aff214879b450e532a091941558727d.tar.bz2
samba-4c7b4cd33aff214879b450e532a091941558727d.zip
r12946: fix a segfault in nmbd when 'wins support = yes' caused by double free
(This used to be commit c11372f4ec49634e2ae2e6b9ddf4d2b72976f9c5)
-rw-r--r--source3/nmbd/nmbd_namelistdb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index 894b877613..baaf5dbd54 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -82,9 +82,11 @@ void remove_name_from_namelist(struct subnet_record *subrec,
{
if (subrec == wins_server_subnet) {
remove_name_from_wins_namelist(namerec);
- } else {
- subrec->namelist_changed = True;
- }
+ return;
+ }
+
+ subrec->namelist_changed = True;
+
DLIST_REMOVE(subrec->namelist, namerec);
SAFE_FREE(namerec->data.ip);
ZERO_STRUCTP(namerec);