提交 fd2bf467 authored 作者: Michael Jerris's avatar Michael Jerris

tweak error handling. Found by Klockwork (www.klocwork.com)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8483 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 05b9c163
......@@ -1436,7 +1436,7 @@ SWITCH_STANDARD_APP(att_xfer_function)
timelimit = atoi(var);
}
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS || !peer_session) {
goto end;
}
......@@ -1475,13 +1475,10 @@ SWITCH_STANDARD_APP(att_xfer_function)
switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, bond);
}
end:
if (peer_session) {
switch_core_session_rwunlock(peer_session);
}
switch_core_session_rwunlock(peer_session);
end:
switch_channel_set_variable(channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论