mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-01 18:09:41 +00:00
Merge "res_pjsip_send_to_voicemail.c: Fix off-nominal double channel unref." into 13
This commit is contained in:
@@ -165,12 +165,10 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
|
||||
sip_session_datastore->data = other_party;
|
||||
|
||||
if (ast_sip_session_add_datastore(session, sip_session_datastore)) {
|
||||
ast_channel_unref(other_party);
|
||||
ao2_ref(sip_session_datastore, -1);
|
||||
send_response(session, 500, rdata);
|
||||
return -1;
|
||||
}
|
||||
ao2_ref(sip_session_datastore, -1);
|
||||
|
||||
if (has_feature) {
|
||||
pbx_builtin_setvar_helper(other_party, SEND_TO_VM_HEADER,
|
||||
@@ -182,6 +180,7 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
|
||||
SEND_TO_VM_REDIRECT_VALUE);
|
||||
}
|
||||
|
||||
ao2_ref(sip_session_datastore, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user