From 44ca7f4423e989b8f57ecd3b52f50dc1e282125b Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 27 Dec 2001 18:22:59 +0000 Subject: [w3m-dev 02772] From: Fumitoshi UKAI --- url.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'url.c') diff --git a/url.c b/url.c index b56b23d..d055347 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.27 2001/12/27 02:32:08 ukai Exp $ */ +/* $Id: url.c,v 1.28 2001/12/27 18:22:59 ukai Exp $ */ #include "fm.h" #include #include @@ -275,7 +275,7 @@ init_PRNG() static SSL * openSSLHandle(int sock, char *hostname) { - SSL *handle; + SSL *handle = NULL; Str emsg; Str amsg = NULL; char *ans; @@ -456,6 +456,9 @@ openSSLHandle(int sock, char *hostname) accept_this_site = Strnew_charp(hostname); return handle; eend: + close(sock); + if (handle) + SSL_free(handle); accept_this_site = NULL; emsg = Sprintf("SSL error: %s", ERR_error_string(ERR_get_error(), NULL)); disp_err_message(emsg->ptr, FALSE); -- cgit v1.2.3