summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-28 22:04:14 +0000
committerJeremy Allison <jra@samba.org>2002-10-28 22:04:14 +0000
commit0fff69f974ac8add92da2ee3e0e08084c09e6e9a (patch)
treef35780c0396ceaa08219f8f9e1aedee620da1f2a
parent5d88296d802a30e02ab4324918fc3c5b2d1a0124 (diff)
downloadsamba-0fff69f974ac8add92da2ee3e0e08084c09e6e9a.tar.gz
samba-0fff69f974ac8add92da2ee3e0e08084c09e6e9a.tar.bz2
samba-0fff69f974ac8add92da2ee3e0e08084c09e6e9a.zip
Fix fd leak with kernel change notify.
Jeremy. (This used to be commit a2043390734b38cab8fe2f013960272c0e202b99)
-rw-r--r--source3/smbd/notify_kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index 8454917163..df553721ef 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -127,7 +127,6 @@ static void kernel_remove_notify(void *datap)
BlockSignals(True, RT_SIGNAL_NOTIFY);
for (i = 0; i < signals_received; i++) {
if (fd == (int)fd_pending_array[i]) {
- close(fd);
fd_pending_array[i] = (SIG_ATOMIC_T)-1;
if (signals_received - i - 1) {
memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
@@ -138,6 +137,7 @@ static void kernel_remove_notify(void *datap)
break;
}
}
+ close(fd);
BlockSignals(False, RT_SIGNAL_NOTIFY);
}
SAFE_FREE(data);