diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2011-10-13 10:54:41 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2011-10-13 10:54:41 +0000 |
commit | 8b26e455545c875b1dc7d7e30999cc70f83b75f3 (patch) | |
tree | 7aa041e5a2f9ef15f7ebff6613571ccdceb2adaa /usr.sbin | |
parent | 7231fd77a76af504b64032b9e3fa1f3ada887c3e (diff) |
Drop a reference to the client SSL_CTX after SSL_new(), so that it is
correctly freed by SSL_free() at the end of the session.
Plug a leak in the mta.
ok! gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/ssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/ssl.c b/usr.sbin/smtpd/ssl.c index 1297b3c6a45..df0d983f3d3 100644 --- a/usr.sbin/smtpd/ssl.c +++ b/usr.sbin/smtpd/ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.c,v 1.37 2011/09/01 19:56:49 eric Exp $ */ +/* $OpenBSD: ssl.c,v 1.38 2011/10/13 10:54:40 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -608,6 +608,7 @@ ssl_client_init(int fd, char *cert, size_t certsz, char *key, size_t keysz) if ((ssl = SSL_new(ctx)) == NULL) goto done; + SSL_CTX_free(ctx); if (!SSL_set_ssl_method(ssl, SSLv23_client_method())) goto done; |