From: Dragos Oancea Date: Thu, 18 Nov 2021 23:54:26 +0000 (+0200) Subject: [mod_event_socket] fix strcmp crash X-Git-Tag: v1.10.8^2~109^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1451%2Fhead;p=thirdparty%2Ffreeswitch.git [mod_event_socket] fix strcmp crash --- diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index d60db15112..0b01e55e66 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -377,7 +377,7 @@ static void event_handler(switch_event_t *event) if (!uuid || (l->session && strcmp(uuid, switch_core_session_get_uuid(l->session)))) { send = 0; } - if (!strcmp(switch_core_session_get_uuid(l->session), switch_event_get_header_nil(event, "Job-Owner-UUID"))) { + if (l->session && !strcmp(switch_core_session_get_uuid(l->session), switch_event_get_header_nil(event, "Job-Owner-UUID"))) { send = 1; } }