summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-14 17:38:05 +0100
committerVolker Lendecke <vl@samba.org>2009-02-14 22:00:44 +0100
commitd39849ddcd57661bdbfbbb7f1af89160e26a995c (patch)
tree7a4fb7fa5454c42f5d8bd4b8d089f4bf20a17be6 /lib/tevent
parent01aff219dd4036ca9a542acac08b7355b764e4ce (diff)
downloadsamba-d39849ddcd57661bdbfbbb7f1af89160e26a995c.tar.gz
samba-d39849ddcd57661bdbfbbb7f1af89160e26a995c.tar.bz2
samba-d39849ddcd57661bdbfbbb7f1af89160e26a995c.zip
Fix a warning and a bug: pipe(2) can fail
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent_signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index b87c212402..f71d9b36b0 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -255,7 +255,10 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
if (ev->pipe_fde == NULL) {
if (sig_state->pipe_hack[0] == 0 &&
sig_state->pipe_hack[1] == 0) {
- pipe(sig_state->pipe_hack);
+ if (pipe(sig_state->pipe_hack) == -1) {
+ talloc_free(se);
+ return NULL;
+ }
ev_set_blocking(sig_state->pipe_hack[0], false);
ev_set_blocking(sig_state->pipe_hack[1], false);
}