diff options
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 1996c6d3..f5a6fa3d 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -239,8 +239,8 @@ main (int argc, char **argv) result = np_net_ssl_init(sd); if(result != STATE_OK) { printf (_("CRITICAL - Cannot create SSL context.\n")); - np_net_ssl_cleanup(); close(sd); + np_net_ssl_cleanup(); return STATE_CRITICAL; } else { ssl_established = 1; @@ -764,10 +764,12 @@ recvlines(char *buf, size_t bufsize) int my_close (void) { + int result; + result = close(sd); #ifdef HAVE_SSL - np_net_ssl_cleanup(); + np_net_ssl_cleanup(); #endif - return close(sd); + return result; } |