mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix evsig_dealloc memory leak with debugging turned on.
This commit is contained in:
parent
50be5a14b5
commit
9b724b288a
4
signal.c
4
signal.c
@ -399,9 +399,11 @@ evsig_dealloc(struct event_base *base)
|
||||
int i = 0;
|
||||
if (base->sig.ev_signal_added) {
|
||||
event_del(&base->sig.ev_signal);
|
||||
event_debug_unassign(&base->sig.ev_signal);
|
||||
base->sig.ev_signal_added = 0;
|
||||
}
|
||||
/* debug event is created in evsig_init/event_assign even when
|
||||
* ev_signal_added == 0, so unassign is required */
|
||||
event_debug_unassign(&base->sig.ev_signal);
|
||||
|
||||
for (i = 0; i < NSIG; ++i) {
|
||||
if (i < base->sig.sh_old_max && base->sig.sh_old[i] != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user