diff options
Diffstat (limited to 'channels')
-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; } |