From: Andrey Volk Date: Thu, 6 Jun 2024 09:58:57 +0000 (+0300) Subject: [Core] switch_find_local_ip: Coverity 1024290 Resource leak. X-Git-Tag: v1.10.12^2~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2548%2Fhead;p=thirdparty%2Ffreeswitch.git [Core] switch_find_local_ip: Coverity 1024290 Resource leak. --- 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