summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2014-09-05 08:12:48 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2014-09-05 08:12:48 +0500
commit3b17edbbcaaa631c631453276c58bdc9a8773f58 (patch)
tree4a54b7442b93e24abd5565693ca3f9d27c2a673d
parent1c5dc354367440757380bf02f15e09ab2b8fd967 (diff)
Stop leaking sock descriptors in error path.
-rw-r--r--pop3d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pop3d.c b/pop3d.c
index dd71cb9..f16b0cd 100644
--- a/pop3d.c
+++ b/pop3d.c
@@ -175,6 +175,8 @@ authenticate(struct imsgev *iev, struct imsg *imsg)
if (maildrop_setup(imsg->hdr.peerid, pair, pw) == -1) {
logit(LOG_INFO, "%u: unable to fork maildrop process",
imsg->hdr.peerid);
+ close(pair[0]);
+ close(pair[1]);
pair[0] = -1;
goto end;
}