]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_event_socket] fix strcmp crash 1451/head
authorDragos Oancea <dragos@signalwire.com>
Thu, 18 Nov 2021 23:54:26 +0000 (01:54 +0200)
committerDragos Oancea <dragos@signalwire.com>
Fri, 19 Nov 2021 14:17:03 +0000 (16:17 +0200)
src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index d60db15112fa107e15ecb2bc991d800710cbd8b9..0b01e55e66d8d4923b5bd49278a10dd006028015 100644 (file)
@@ -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;
                        }
                }