diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2018-08-30 11:58:02 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2018-08-30 11:58:02 +0000 |
commit | 88e628bbfd083421f636ce8231fc7cad97a96039 (patch) | |
tree | 4e87c9ae6f4f66d853eb34af797411ebf8271a83 /usr.sbin/smtpd | |
parent | 378f8f0bf6f1ad78dc1e9b4a0897f819f5fa2662 (diff) |
fix use-after-free
spotted by jsg@
input from jsg@ miko@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/smtp_client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp_client.c b/usr.sbin/smtpd/smtp_client.c index 289ff3b2441..8b28f3a6d86 100644 --- a/usr.sbin/smtpd/smtp_client.c +++ b/usr.sbin/smtpd/smtp_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_client.c,v 1.5 2018/06/09 10:01:17 eric Exp $ */ +/* $OpenBSD: smtp_client.c,v 1.6 2018/08/30 11:58:01 eric Exp $ */ /* * Copyright (c) 2018 Eric Faurot <eric@openbsd.org> @@ -209,13 +209,13 @@ smtp_client_free(struct smtp_client *proto) if (proto->mail) fatalx("current task should have been deleted already"); + smtp_closed(proto->tag, proto); + if (proto->io) io_free(proto->io); free(proto->reply); free(proto); - - smtp_closed(proto->tag, proto); } /* |