diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-07-13 22:11:42 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-07-13 22:11:42 -0500 |
commit | 436fc7ca2b97113aad1db64610c467cc6528c9ee (patch) | |
tree | dabc887cc80b7934fd21669676fd644058815292 | |
parent | 8c3d301dc645d5bb45f3189b0f827f7d0384908b (diff) | |
parent | 2be13d62fd35472d30b52d0e6bdc33390b0f17f6 (diff) |
Merge "chan_sip: Fix reference leak in mwi_event_cb" into 13
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c14f8ba07..0336e2a34 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17186,10 +17186,8 @@ static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct struct sip_peer *peer = sip_find_peer(peer_name, NULL, TRUE, FINDALLDEVICES, FALSE, 0); if (stasis_subscription_final_message(sub, msg)) { - if (peer) { - /* configuration reloaded */ - return; - } + /* peer can be non-NULL during reload. */ + ao2_cleanup(peer); ast_free(peer_name); return; } |