chan_sip: Fix theoretical leak of p->refer.
authorCorey Farrell <git@cfware.com>
Mon, 17 Nov 2014 16:02:06 +0000 (16:02 +0000)
committerCorey Farrell <git@cfware.com>
Mon, 17 Nov 2014 16:02:06 +0000 (16:02 +0000)
commit4cea5fd4bac9b058c060d3d61ea25f04d56d9846
tree1900d3f8e2207745a3d0146b8c820bda8a7be033
parent948af7fd798ece481046a7b6524bf1cae20d63ac
chan_sip: Fix theoretical leak of p->refer.

If transmit_refer is called when p->refer is already allocated,
it leaks the previous allocation.  Updated code to always free
previous allocation during a new allocation.  Also instead of
checking if we have a previous allocation, always create a
clean record.

ASTERISK-15242 #close
Reported by: David Woolley
Review: https://reviewboard.asterisk.org/r/4160/
........

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

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

Merged revisions 428119 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c