summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-28 22:04:47 +0000
committerJeremy Allison <jra@samba.org>2002-10-28 22:04:47 +0000
commit608985f7ea1648142872983631e209443c0e76f6 (patch)
treecf85551a74017c664362ded23b13bd928ea2be42 /source3
parent70e52f29ea4986cfd3bdffa9a366773d897d2189 (diff)
downloadsamba-608985f7ea1648142872983631e209443c0e76f6.tar.gz
samba-608985f7ea1648142872983631e209443c0e76f6.tar.bz2
samba-608985f7ea1648142872983631e209443c0e76f6.zip
Fix fd leak with kernel change notify.
Jeremy. (This used to be commit 78df2c916ae3940f0124912f99b1e0ca3914fff5)
Diffstat (limited to 'source3')
-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);