diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-06 04:49:53 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-06 04:49:53 +0000 |
commit | 3d32c95c745d0c771a655577a6819350d8de48a1 (patch) | |
tree | 56198119dead3e1936baf2ee56432991dffc79c1 /usr.sbin | |
parent | 5aa0e3f0355e445f9c826a7f58c3620b8c80e6d8 (diff) |
NULL-ify s_msg.datafp upon fclose unconditionally.
ok gilles
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 74441cb3723..b2bf0b72cad 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.20 2008/12/06 02:43:58 jacekm Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.21 2008/12/06 04:49:52 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -733,6 +733,7 @@ read: if (strcmp(line, ".") == 0) { s->s_state = S_DONE; fclose(s->s_msg.datafp); + s->s_msg.datafp = NULL; bufferevent_disable(s->s_bev, EV_READ); @@ -741,7 +742,6 @@ read: evbuffer_add_printf(s->s_bev->output, "554 Transaction failed\r\n"); - s->s_msg.datafp = NULL; /* Remove message file */ imsg_compose(s->s_env->sc_ibufs[PROC_QUEUE], IMSG_QUEUE_REMOVE_MESSAGE, 0, 0, -1, &s->s_msg, sizeof(s->s_msg)); |