Bläddra i källkod

Set the pointers to the SSL and SSL_CTX objects back to NULL after
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

Holger Weiss 18 år sedan
förälder
incheckning
bad9e04c54
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      plugins/sslutils.c

+ 2 - 0
plugins/sslutils.c

@@ -71,6 +71,8 @@ void np_net_ssl_cleanup (){
 				SSL_shutdown (s);
 				SSL_shutdown (s);
 				SSL_free (s);
 				SSL_free (s);
 				if(c) SSL_CTX_free (c);
 				if(c) SSL_CTX_free (c);
+				c=NULL;
+				s=NULL;
 		}
 		}
 }
 }