mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
[Core] Fix possible memory leak of switch_core_session_message_t in switch_core_session_queue_indication()
This commit is contained in:
parent
d127eeeecc
commit
97930570dc
@ -1026,8 +1026,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_queue_indication(switch_core
|
||||
msg->message_id = indication;
|
||||
msg->from = __FILE__;
|
||||
switch_set_flag(msg, SCSMF_DYNAMIC);
|
||||
switch_core_session_queue_message(session, msg);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
if (switch_core_session_queue_message(session, msg) == SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
free(msg);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user