summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 1996c6d..f5a6fa3 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -239,8 +239,8 @@ main (int argc, char **argv)
239 result = np_net_ssl_init(sd); 239 result = np_net_ssl_init(sd);
240 if(result != STATE_OK) { 240 if(result != STATE_OK) {
241 printf (_("CRITICAL - Cannot create SSL context.\n")); 241 printf (_("CRITICAL - Cannot create SSL context.\n"));
242 np_net_ssl_cleanup();
243 close(sd); 242 close(sd);
243 np_net_ssl_cleanup();
244 return STATE_CRITICAL; 244 return STATE_CRITICAL;
245 } else { 245 } else {
246 ssl_established = 1; 246 ssl_established = 1;
@@ -764,10 +764,12 @@ recvlines(char *buf, size_t bufsize)
764int 764int
765my_close (void) 765my_close (void)
766{ 766{
767 int result;
768 result = close(sd);
767#ifdef HAVE_SSL 769#ifdef HAVE_SSL
768 np_net_ssl_cleanup(); 770 np_net_ssl_cleanup();
769#endif 771#endif
770 return close(sd); 772 return result;
771} 773}
772 774
773 775