[mod_verto] coverity CID 1294451 (Dereference before null check)

This commit is contained in:
Dragos Oancea 2023-05-30 16:32:20 +03:00 committed by Andrey Volk
parent 889f761df6
commit 8c4c3e3999
1 changed files with 4 additions and 6 deletions

View 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;
}