summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2011-03-21 13:02:53 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2011-03-21 13:02:53 +0000
commitca5c0f6c2e3326df90f7718407975ba00575984b (patch)
tree495e1cf6c55ed4dfc0a307756f1a8cd439c32082 /usr.sbin/smtpd
parentb59bed8f4713658eb8a086f892f41f48c9758277 (diff)
- reset smtp_client pointer to NULL after client_close()
- datafd is closed in client_close()
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/mta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index be30fc96a3c..7b83e44caed 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.97 2010/11/29 15:25:55 gilles Exp $ */
+/* $OpenBSD: mta.c,v 1.98 2011/03/21 13:02:52 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -454,6 +454,7 @@ mta_enter_state(struct mta_session *s, int newstate, void *p)
res = SPLAY_FIND(ssltree, s->env->sc_ssl, &key);
if (res == NULL) {
client_close(pcb);
+ s->pcb = NULL;
mta_status(s, "190 certificate not found");
mta_enter_state(s, MTA_DONE, NULL);
break;
@@ -512,7 +513,6 @@ mta_enter_state(struct mta_session *s, int newstate, void *p)
TAILQ_REMOVE(&s->relays, relay, entry);
free(relay);
}
- close(s->datafd);
free(s->secret);
free(s->host);
free(s->cert);