diff --git a/ChangeLog b/ChangeLog index cc698f47..314929c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Changes in current version: o New function event_set_mem_functinons. It allows the user to give libevent replacement functions to use for memory management in place of malloc(), free(), etc. This should be generally useful for memory instrumentation, specialized allocators, and so on. o The kqueue implementation now catches signals that are raised after event_add() is called but before the event_loop() call. This makes it match the other implementations. o The kqueue implementation now restores original signal handlers correctly when its signal events are removed. + o Check return value of event_add in signal.c Changes in 1.4.0: diff --git a/signal.c b/signal.c index 60caef30..ae07850d 100644 --- a/signal.c +++ b/signal.c @@ -199,8 +199,9 @@ evsignal_add(struct event *ev) evsignal_base = base; if (!sig->ev_signal_added) { + if (event_add(&sig->ev_signal, NULL)) + return (-1); sig->ev_signal_added = 1; - event_add(&sig->ev_signal, NULL); } return (0);