1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Fix fd leak with kernel change notify.

Jeremy.
(This used to be commit a204339073)
This commit is contained in:
Jeremy Allison 2002-10-28 22:04:14 +00:00
parent 5d88296d80
commit 0fff69f974

View File

@ -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);