]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[libesl] Coverity 1024719,1024720 Unchecked return value from library
authorAndrey Volk <andywolk@gmail.com>
Fri, 31 Jan 2025 14:59:18 +0000 (17:59 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 3 Feb 2025 23:18:47 +0000 (02:18 +0300)
libs/esl/src/esl.c

index d796860a119b93dd84b6bee6bd69917edb2d6a89..e5c0b95b55685ab133b1a2bd5971b4be0041b860 100644 (file)
@@ -696,7 +696,10 @@ ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_list
        }
        
 
-       esl_socket_reuseaddr(server_sock);
+       if (esl_socket_reuseaddr(server_sock) != 0) {
+               status = ESL_FAIL;
+               goto end;
+       }
                   
        memset(&addr, 0, sizeof(addr));
        addr.sin_family = AF_INET;
@@ -751,7 +754,10 @@ ESL_DECLARE(esl_status_t) esl_listen_threaded(const char *host, esl_port_t port,
                return ESL_FAIL;
        }
 
-       esl_socket_reuseaddr(server_sock);
+       if (esl_socket_reuseaddr(server_sock) != 0) {
+               status = ESL_FAIL;
+               goto end;
+       }
                   
        memset(&addr, 0, sizeof(addr));
        addr.sin_family = AF_INET;