mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
fix crash when passing null string to switch_core_session_locate (via killchan with no param)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2479 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -117,7 +117,7 @@ static switch_status_t kill_function(char *dest, switch_core_session_t *isession
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if ((session = switch_core_session_locate(dest))) {
|
||||
if (dest && (session = switch_core_session_locate(dest))) {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_core_session_kill_channel(session, SWITCH_SIG_KILL);
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||
|
Reference in New Issue
Block a user