diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2008-11-11 20:59:12 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2008-11-11 20:59:12 +0000 |
commit | c713e1811e21a1e97cea422afc693affb485b692 (patch) | |
tree | 2539ecd7b9b0342e65de812a3199832baf087242 /usr.sbin/smtpd | |
parent | 3374849be0ec8e68c553c2e8f9e1c53e790e2667 (diff) |
- now that we fdopen() message file descriptor, do not forget to fclose()
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/store.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/store.c b/usr.sbin/smtpd/store.c index e2f86fa76d2..4ead9cf1ea2 100644 --- a/usr.sbin/smtpd/store.c +++ b/usr.sbin/smtpd/store.c @@ -1,4 +1,4 @@ -/* $OpenBSD: store.c,v 1.4 2008/11/10 16:33:07 gilles Exp $ */ +/* $OpenBSD: store.c,v 1.5 2008/11/11 20:59:11 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -235,6 +235,7 @@ store_write_daemon(struct batch *batchp, struct message *messagep) fflush(mboxfp); fsync(fileno(mboxfp)); fclose(mboxfp); + fclose(messagefp); return 1; bad: @@ -274,6 +275,7 @@ store_write_message(struct batch *batchp, struct message *messagep) fflush(mboxfp); fsync(fileno(mboxfp)); fclose(mboxfp); + fclose(messagefp); return 1; bad: @@ -302,6 +304,5 @@ store_message(struct batch *batchp, struct message *messagep, } return 0; } - return 1; } |