summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_subnetdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nmbd/nmbd_subnetdb.c')
-rw-r--r--source/nmbd/nmbd_subnetdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c
index 5a93d8bec03..3b9be2c2ce9 100644
--- a/source/nmbd/nmbd_subnetdb.c
+++ b/source/nmbd/nmbd_subnetdb.c
@@ -57,8 +57,6 @@ yet and it may be in use by a response record
void close_subnet(struct subnet_record *subrec)
{
- DLIST_REMOVE(subnetlist, subrec);
-
if (subrec->dgram_sock != -1) {
close(subrec->dgram_sock);
subrec->dgram_sock = -1;
@@ -67,6 +65,8 @@ void close_subnet(struct subnet_record *subrec)
close(subrec->nmb_sock);
subrec->nmb_sock = -1;
}
+
+ DLIST_REMOVE(subnetlist, subrec);
}
/****************************************************************************