chan_sip: Unref outbound proxy structure on dialog/pvt destruction.

Make sure outbound proxy refs are always unreffed on dialog destruction.

Review: https://reviewboard.asterisk.org/r/4016/
........

Merged revisions 423800 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 423801 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 423802 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/97/197/1
Walter Doekes 11 years ago
parent d25390073b
commit 20f4ea0df7

@ -4390,7 +4390,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);
}
@ -6454,6 +6454,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);

Loading…
Cancel
Save