NULL is not a valid event context.
authorJeremy Allison <jra@samba.org>
Thu, 1 Oct 2009 23:18:33 +0000 (16:18 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 26 Nov 2009 10:38:54 +0000 (11:38 +0100)
Jeremy.
(cherry picked from commit 2820dc529a04985b7223603e826f6b9905d2611b)

lib/tevent/tevent_signal.c

index d3325b67ac06a4dced5c96307299bd352325d7ef..ab170a66cf75f38c5785e720e3c7ceff83419e79 100644 (file)
@@ -92,7 +92,7 @@ static void tevent_common_signal_handler(int signum)
 
        /* Write to each unique event context. */
        for (sl = sig_state->sig_handlers[signum]; sl; sl = sl->next) {
-               if (sl->se->event_ctx != ev) {
+               if (sl->se->event_ctx && sl->se->event_ctx != ev) {
                        ev = sl->se->event_ctx;
                        /* doesn't matter if this pipe overflows */
                        res = write(ev->pipe_fds[1], &c, 1);