]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] switch_find_local_ip: Coverity 1024290 Resource leak. 2548/head
authorAndrey Volk <andywolk@gmail.com>
Thu, 6 Jun 2024 09:58:57 +0000 (12:58 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 29 Jul 2024 23:48:59 +0000 (02:48 +0300)
src/switch_utils.c

index 90c5de059a5d5064687bcee4cceaddd1343ebff2..1af2011dbd28a15ea576e601e08df9a5667c81fa 100644 (file)
@@ -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