tevent: Fix a segfault upon the first signal
commit5805ecffe1f5fe5cb92836d159c761849c018eed
authorVolker Lendecke <vl@samba.org>
Sat, 29 Aug 2009 07:41:32 +0000 (29 09:41 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 9 Sep 2009 10:45:08 +0000 (9 12:45 +0200)
tree3fdad2242ace4d34d6d89f1831542a8a3d060ec9
parent581a85eeb1cbed45d2eddee20fab1a168fdb1518
tevent: Fix a segfault upon the first signal

When the first signal arrives, tevent_common_signal_handler() crashed: "ev" is
initialized to NULL, so the first "write(ev->pipe_fds[1], &c, 1);" dereferences
NULL.

Rusty, Tridge, please check. Also, can you tell me a bit more about the
environment you tested this in? I'd be curious to see where this survived.

Thanks,

Volker
(cherry picked from commit 23abcd2318c69753aa2a144e1dc0f9cf9efdb705)
(cherry picked from commit 1108225c1316521bf2bb59c9b99b030440af0002)
lib/tevent/tevent_signal.c