mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_pjsip: Add missing NULL checks when using pjsip_inv_end_session().
pjsip_inv_end_session() is documented as being able to return the passed in tdata parameter set to NULL on success. Change-Id: I09d53725c49b7183c41bfa1be3ff225f3a8d3047
This commit is contained in:
@@ -969,7 +969,8 @@ inv_replace_failed:
|
||||
session->defer_terminate = 1;
|
||||
ast_hangup(session->channel);
|
||||
|
||||
if (pjsip_inv_end_session(session->inv_session, response, NULL, &packet) == PJ_SUCCESS) {
|
||||
if (pjsip_inv_end_session(session->inv_session, response, NULL, &packet) == PJ_SUCCESS
|
||||
&& packet) {
|
||||
ast_sip_session_send_response(session, packet);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user