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 05e81f2..587a724 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -235,8 +235,8 @@ main (int argc, char **argv)
235 result = np_net_ssl_init(sd); 235 result = np_net_ssl_init(sd);
236 if(result != STATE_OK) { 236 if(result != STATE_OK) {
237 printf (_("CRITICAL - Cannot create SSL context.\n")); 237 printf (_("CRITICAL - Cannot create SSL context.\n"));
238 np_net_ssl_cleanup();
239 close(sd); 238 close(sd);
239 np_net_ssl_cleanup();
240 return STATE_CRITICAL; 240 return STATE_CRITICAL;
241 } else { 241 } else {
242 ssl_established = 1; 242 ssl_established = 1;
@@ -760,10 +760,12 @@ recvlines(char *buf, size_t bufsize)
760int 760int
761my_close (void) 761my_close (void)
762{ 762{
763 int result;
764 result = close(sd);
763#ifdef HAVE_SSL 765#ifdef HAVE_SSL
764 np_net_ssl_cleanup(); 766 np_net_ssl_cleanup();
765#endif 767#endif
766 return close(sd); 768 return result;
767} 769}
768 770
769 771