diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 39250923a4fde1341e65a184371f5e1fd7132c25..668eeec297d67845b6ceb9b35329520e6e7607b4 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4363,7 +4363,7 @@ int __sip_ack(struct sip_pvt *p, uint32_t seqno, int resp, int sipmethod) If obforcing is set, we will keep the outbound proxy during the whole dialog, regardless of what the SIP rfc says */ - if (p->outboundproxy && !p->outboundproxy->force){ + if (p->outboundproxy && !p->outboundproxy->force) { ref_proxy(p, NULL); } @@ -6383,6 +6383,10 @@ void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist) p->options = NULL; } + if (p->outboundproxy) { + ref_proxy(p, NULL); + } + if (p->notify) { ast_variables_destroy(p->notify->headers); ast_free(p->notify->content);