]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_verto] coverity CID 1294451 (Dereference before null check)
authorDragos Oancea <dragos@signalwire.com>
Tue, 30 May 2023 13:32:20 +0000 (16:32 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 31 May 2023 21:43:08 +0000 (00:43 +0300)
src/mod/endpoints/mod_verto/mod_verto.c

index 7a1b5d17e8535e22a723646501584bf663d46dad..3fa7b3473a41f294118a7a6860f9cc52f2b792f4 100644 (file)
@@ -4756,14 +4756,12 @@ static int start_jsock(verto_profile_t *profile, ks_socket_t sock, int family)
 
  error:
 
-       if (jsock) {
-               if (jsock->client_socket != KS_SOCK_INVALID) {
-                       close_socket(&jsock->client_socket);
-               }
-
-               switch_core_destroy_memory_pool(&pool);
+       if (jsock->client_socket != KS_SOCK_INVALID) {
+               close_socket(&jsock->client_socket);
        }
 
+       switch_core_destroy_memory_pool(&pool);
+
        return -1;
 }