diff options
author | Walter Doekes <walter+asterisk@wjd.nu> | 2014-09-24 08:55:02 +0000 |
---|---|---|
committer | Walter Doekes <walter+asterisk@wjd.nu> | 2014-09-24 08:55:02 +0000 |
commit | 39fada4dc9de141c46d4cdc5c8fdebce21e9ab4f (patch) | |
tree | ccda16473ebfb83c3cd96d7e4f82cdfbdef67d15 | |
parent | a89964a5107b7347c41823c1d4500dd8daa83954 (diff) |
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
........
Merged revisions 423803 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 299795ab7..e2546b491 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4391,7 +4391,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); } @@ -6460,6 +6460,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); |