git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01aff21
)
Fix a warning and a bug: pipe(2) can fail
author
Volker Lendecke
<vl@samba.org>
Sat, 14 Feb 2009 16:38:05 +0000
(17:38 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 14 Feb 2009 21:00:44 +0000
(22:00 +0100)
lib/tevent/tevent_signal.c
patch
|
blob
|
history
diff --git
a/lib/tevent/tevent_signal.c
b/lib/tevent/tevent_signal.c
index b87c212402b67d8dabc60af29e4fc0d03849a158..f71d9b36b0e365431f11215fc90ba3892c29c25f 100644
(file)
--- 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);
}