diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-03-21 09:21:58 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-03-21 09:21:58 +0000 |
commit | b59bed8f4713658eb8a086f892f41f48c9758277 (patch) | |
tree | bab10641a67c26ce4ba4c84205a7e3872d218abe /usr.sbin/smtpd/client.c | |
parent | 8c7e111e5996a2f904e264f686fcc0cc83caec7b (diff) |
fix a memory leak in client.c and properly close envelope in
queue_shared.c
diff from Jared Yanovich, sent to bugs@ by Jonny Mosco
Diffstat (limited to 'usr.sbin/smtpd/client.c')
-rw-r--r-- | usr.sbin/smtpd/client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/client.c b/usr.sbin/smtpd/client.c index 0f256d48f67..2a3eac97d4a 100644 --- a/usr.sbin/smtpd/client.c +++ b/usr.sbin/smtpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.33 2010/11/28 13:56:43 gilles Exp $ */ +/* $OpenBSD: client.c,v 1.34 2011/03/21 09:21:57 gilles Exp $ */ /* * Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net> @@ -573,6 +573,7 @@ client_close(struct smtp_client *sp) SSL_free(sp->ssl); #endif close(sp->w.fd); + fclose(sp->body); free(sp); } @@ -690,6 +691,8 @@ client_getln(struct smtp_client *sp, int type) if (ln[3] == ' ') break; + + free(ln); } /* validate reply code */ |