aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-09-30 16:37:04 +0200
committerJohannes Berg <johannes@sipsolutions.net>2009-09-30 16:37:12 +0200
commit771fe630d71993b9d270a9a6145ecaa8510c4f1c (patch)
tree0d6b002ec71050e19a1ed9003f1e895cd40b2899
parent1e33710fe67026f5e2c889020ce8549badf5aa8c (diff)
downloaddovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.tar.gz
dovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.tar.xz
dovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.zip
check return value of pipe()
(part of a patch from Andreas Schneider)
-rw-r--r--dspam-exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dspam-exec.c b/dspam-exec.c
index 3c52271..ecfb9f1 100644
--- a/dspam-exec.c
+++ b/dspam-exec.c
@@ -58,7 +58,8 @@ static int call_dspam(const char *signature, enum classification wanted)
* non-zero exit code on errors so we treat it as an error
* if it logged anything to stderr.
*/
- pipe(pipes);
+ if (pipe(pipes) < 0)
+ return -1;
pid = fork();
if (pid < 0)