summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-10-02 00:28:31 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-10-02 00:28:31 +0000
commitd3f5954c30277ac74c0ae9d1d4afd611e7054d00 (patch)
tree9c858fdbb3c4cdcb766f3ca66d08e2864a2a4197 /usr.sbin/smtpd
parentd3eb0332005ba9687d4756ae0c39ecd906793364 (diff)
reset static pointer to NULL after we free it, just in case another bug
leads us to reuse it.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/lka.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index ba20336a8eb..eacbc0549c6 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.175 2015/01/20 17:37:54 deraadt Exp $ */
+/* $OpenBSD: lka.c,v 1.176 2015/10/02 00:28:30 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -185,6 +185,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
free(req_ca_vrfy_smtp->chain_cert_len);
free(req_ca_vrfy_smtp->cert);
free(req_ca_vrfy_smtp);
+ req_ca_vrfy_smtp = NULL;
return;
case IMSG_SMTP_AUTHENTICATE:
@@ -306,6 +307,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
free(req_ca_vrfy_mta->chain_cert_len);
free(req_ca_vrfy_mta->cert);
free(req_ca_vrfy_mta);
+ req_ca_vrfy_mta = NULL;
return;
case IMSG_MTA_LOOKUP_CREDENTIALS: