summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 21480b325..e8d9e4550 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -22680,10 +22680,12 @@ static int handle_incoming(struct sip_pvt *p, struct sip_request *req, struct so
snprintf(causevar, sizeof(causevar), "MASTER_CHANNEL(HASH(SIP_CAUSE,%s))", owner->name);
snprintf(causeval, sizeof(causeval), "SIP %s", REQ_OFFSET_TO_STR(req, rlPart2));
+ ast_channel_ref(owner);
sip_pvt_unlock(p);
ast_channel_unlock(owner);
*nounlock = 1;
pbx_builtin_setvar_helper(owner, causevar, causeval);
+ ast_channel_unref(owner);
sip_pvt_lock(p);
}
}