Code

return-logic related fix for cert checking, thanks to emmet hogan.
[nagiosplug.git] / plugins / check_http.c
index b86b26463d0b59245e6437696daee6c7d95203d5..54e5ff29619fd55b502718135111253ccc59c20b 100644 (file)
@@ -755,11 +755,9 @@ check_http (void)
     np_net_ssl_init(sd);
     if (check_cert == TRUE) {
       result = np_net_ssl_check_cert(days_till_exp);
-      if(result != STATE_OK){
-        np_net_ssl_cleanup();
-        if(sd) close(sd);
-        return result;
-      }
+      np_net_ssl_cleanup();
+      if(sd) close(sd);
+      return result;
     }
   }
 #endif /* HAVE_SSL */