tevent: Fix a segfault upon the first signal
commit1108225c1316521bf2bb59c9b99b030440af0002
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:27:17 +0000 (9 12:27 +0200)
tree6291360b55c78a15aefba0c1f69dff4f48332993
parent5cc105ac513164d66d4661a41d1daa99f28ab928
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)
lib/tevent/tevent_signal.c