commit 003fd6474fa9abc5354d0dca9dcc9aad58e1d2e8
Author: Oswald Buddenhagen <[email protected]>
Date:   Sun Mar 6 23:04:46 2011 +0100

    don't leak SSL objects

 src/drv_imap.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index d8acc4f..d0f00cf 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1134,6 +1134,12 @@ imap_cancel_store( store_t *gctx )
        if (ctx->buf.sock.fd >= 0)
                close( ctx->buf.sock.fd );
 #ifdef HAVE_LIBSSL
+       if (ctx->buf.sock.ssl) {
+               /* this is mostly a noop, as the socket is already gone. */
+               SSL_shutdown( ctx->buf.sock.ssl );
+
+               SSL_free( ctx->buf.sock.ssl );
+       }
        if (ctx->SSLContext)
                SSL_CTX_free( ctx->SSLContext );
 #endif

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to