summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1f3b27c2a..773f34004 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15550,7 +15550,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
if (!strcmp(p_old->username, p->username)) {
if (!strcmp(p_old->exten, p->exten) &&
!strcmp(p_old->context, p->context)) {
- p->needdestroy = 1;
+ p_old->needdestroy = 1;
sip_pvt_unlock(p_old);
break;
}