git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
522b747
)
Fix fd leak with kernel change notify.
author
Jeremy Allison
<jra@samba.org>
Mon, 28 Oct 2002 22:04:47 +0000
(22:04 +0000)
committer
Jeremy Allison
<jra@samba.org>
Mon, 28 Oct 2002 22:04:47 +0000
(22:04 +0000)
Jeremy.
source/smbd/notify_kernel.c
patch
|
blob
|
history
diff --git
a/source/smbd/notify_kernel.c
b/source/smbd/notify_kernel.c
index 8454917163a36741db994c4effb3e6975b518ce8..df553721ef7e7da9184d33afb165e50c9c4d3740 100644
(file)
--- a/
source/smbd/notify_kernel.c
+++ b/
source/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);