From 11e3cff7cb9097c347663fe3092947648eadef91 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Thu, 6 Jun 2024 12:58:57 +0300 Subject: [PATCH] [Core] switch_find_local_ip: Coverity 1024290 Resource leak. --- src/switch_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index 90c5de059a..1af2011dbd 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -2015,7 +2015,7 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int *ma } doh: - if (tmp_socket > 0) { + if (tmp_socket >= 0) { close(tmp_socket); } #endif