summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-03-02 21:24:14 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-02 21:24:14 -0600
commit71427f1454c3c444f0f38aab440489a611131b81 (patch)
tree5c75db8b86c30feafec75ec34bb67971a1bf826c /res
parent53f84a467075a49738f1f46d1feb1f8f90ba4bd4 (diff)
parent75ec137e91d60795f8c85ab42ed134dd0bc07129 (diff)
Merge "res_pjsip_send_to_voicemail.c: Fix off-nominal double channel unref."
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_send_to_voicemail.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/res/res_pjsip_send_to_voicemail.c b/res/res_pjsip_send_to_voicemail.c
index 9d2b5b14b..cd0f05f27 100644
--- a/res/res_pjsip_send_to_voicemail.c
+++ b/res/res_pjsip_send_to_voicemail.c
@@ -160,12 +160,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,
@@ -177,6 +175,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;
}