Skip to content

Commit 436a032

Browse files
committed
mod_spamassassin: Don't close file descriptor twice.
A soft assertion was triggered due to PIPE_CLOSE(output) closing an already closed file descriptor. Use the CLOSE macro instead of close to ensure the file descriptor is set to -1 after close, prior to the PIPE_CLOSE call. LBBS-100 #close
1 parent 5abe811 commit 436a032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/mod_spamassassin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static int spam_filter_cb(struct smtp_filter_data *f)
229229
headers_written++;
230230
}
231231

232-
close(output[0]); /* Close read end to force child process to exit */
232+
CLOSE(output[0]); /* Close read end to force child process to exit */
233233
waitpid(pid, NULL, 0); /* Reap the child before exiting */
234234
smtp_node(f->smtp)->childpid = 0;
235235

0 commit comments

Comments
 (0)