From 92039629c7e72f9d792f963b5818630dce61c9cb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 21 Apr 2007 21:24:53 +0000 Subject: [PATCH] Curl_ssl_close(): mark the connection as not using SSL anymore, to better survive getting called twice --- lib/sslgen.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/sslgen.c b/lib/sslgen.c index 6bf2403958..faabeeb0d1 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -413,17 +413,14 @@ void Curl_ssl_close(struct connectdata *conn) if(conn->ssl[FIRSTSOCKET].use) { #ifdef USE_SSLEAY Curl_ossl_close(conn); -#else +#endif /* USE_SSLEAY */ #ifdef USE_GNUTLS Curl_gtls_close(conn); -#else -#ifdef USE_GNUTLS - Curl_nss_close(conn); -#else - (void)conn; -#endif /* USE_NSS */ #endif /* USE_GNUTLS */ -#endif /* USE_SSLEAY */ +#ifdef USE_NSS + Curl_nss_close(conn); +#endif /* USE_NSS */ + conn->ssl[FIRSTSOCKET].use = FALSE; } }