chan_sip: Fix reference leak in mwi_event_cb
authorCorey Farrell <git@cfware.com>
Wed, 13 Jul 2016 18:45:07 +0000 (14:45 -0400)
committerCorey Farrell <git@cfware.com>
Wed, 13 Jul 2016 19:10:41 +0000 (14:10 -0500)
commitf73ddde7d4c5d4f7a675e13a4680d03426648bcd
tree1eef387aa7df6bb77dc08c6153248984ac52fbec
parent73d8cb587d6515b707c9cafe334e18fbd7c24905
chan_sip: Fix reference leak in mwi_event_cb

Cleanup the peer reference when stasis_subscription_final_message is
true.  Also free peer_name even if peer exists, after reload a new
peer_name will be allocated.

ASTERISK-26193 #close

Change-Id: If7ecd52facdc5c227f701c760841e3f6ca53cc69
channels/chan_sip.c