diff options
author | 2011-07-19 13:15:54 +0000 | |
---|---|---|
committer | 2011-07-19 13:15:54 +0000 | |
commit | b27243198d4e3ed06a08fd3c080845d37b69bf76 (patch) | |
tree | 92f47da1a8f2fcd9ba12613d1b62dacb068b36a9 | |
parent | fix retry delay calculation (diff) | |
download | wireguard-openbsd-b27243198d4e3ed06a08fd3c080845d37b69bf76.tar.xz wireguard-openbsd-b27243198d4e3ed06a08fd3c080845d37b69bf76.zip |
Re-add the test which is needed in the case where the session fails
early (in MX or SECRET) and the data file is not yet opened.
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/mta.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index b5cf1ddb1de..935131b5e8d 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.108 2011/07/06 20:56:16 gilles Exp $ */ +/* $OpenBSD: mta.c,v 1.109 2011/07/19 13:15:54 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -511,7 +511,8 @@ mta_enter_state(struct mta_session *s, int newstate, void *p) free(relay); } - fclose(s->datafp); + if (s->datafp) + fclose(s->datafp); free(s->secret); free(s->host); |