Code

Save an entire CPU cycle if c points to NULL already.
authorHolger Weiss <hweiss@users.sourceforge.net>
Fri, 1 Jun 2007 17:06:33 +0000 (17:06 +0000)
committerHolger Weiss <hweiss@users.sourceforge.net>
Fri, 1 Jun 2007 17:06:33 +0000 (17:06 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1725 f882894a-f735-0410-b71e-b25c423dba1c

plugins/sslutils.c

index cf3c40322ada8078de3ff80a735c567ff35ecd7f..84a1c8fc9c121f1248bd551b4f12f9ae54f0e71d 100644 (file)
@@ -70,8 +70,10 @@ void np_net_ssl_cleanup (){
                if(s){
                                SSL_shutdown (s);
                                SSL_free (s);
-                               if(c) SSL_CTX_free (c);
-                               c=NULL;
+                               if(c) {
+                                       SSL_CTX_free (c);
+                                       c=NULL;
+                               }
                                s=NULL;
                }
 }