diff --git a/src/switch_utils.c b/src/switch_utils.c index 25f5216177..4edd9c8a68 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -774,10 +774,10 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, end: - if (fd < 0) { + if (fd > -1) { close(fd); } - if (ifd < 0) { + if (ifd > -1) { close(ifd); }