summaryrefslogtreecommitdiff
path: root/res/res_pjsip_send_to_voicemail.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-03-03 05:32:51 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-03 05:32:51 -0600
commit3b6b164f2ec1df09337fe33e92e74757e4acfb9f (patch)
treecf8a8db881cd1a91b8e828c70ef18f9a27d805e3 /res/res_pjsip_send_to_voicemail.c
parentd6e274b97dae51c74d49e7cf9fb1e9510888b7e5 (diff)
parent4c5998ff556eed8e9cb266de86c83cde95b103aa (diff)
Merge "res_pjsip_send_to_voicemail.c: Fix off-nominal double channel unref." into 13
Diffstat (limited to 'res/res_pjsip_send_to_voicemail.c')
-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 8af0e5d75..12d6b74f6 100644
--- a/res/res_pjsip_send_to_voicemail.c
+++ b/res/res_pjsip_send_to_voicemail.c
@@ -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;
}