Code

Set the pointers to the SSL and SSL_CTX objects back to NULL after
authorHolger Weiss <hweiss@users.sourceforge.net>
Fri, 1 Jun 2007 16:42:07 +0000 (16:42 +0000)
committerHolger Weiss <hweiss@users.sourceforge.net>
Fri, 1 Jun 2007 16:42:07 +0000 (16:42 +0000)
freeing them in np_net_ssl_cleanup().  This fixes a check_http segfault
if an SSL site redirects to a non-SSL one (reported by Aravind Gottipati
via IRC).

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1724 f882894a-f735-0410-b71e-b25c423dba1c

plugins/sslutils.c

index 09d58b0f2f4c390aaf7358b485dbf8996e55bd7d..cf3c40322ada8078de3ff80a735c567ff35ecd7f 100644 (file)
@@ -71,6 +71,8 @@ void np_net_ssl_cleanup (){
                                SSL_shutdown (s);
                                SSL_free (s);
                                if(c) SSL_CTX_free (c);
+                               c=NULL;
+                               s=NULL;
                }
 }