Unsubscribe from MWI events in the peer destructor
authorRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 20:46:16 +0000 (20:46 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 20:46:16 +0000 (20:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80388 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 07917f8..95ba65d 100644 (file)
@@ -9406,6 +9406,9 @@ static void peer_destructor(void *obj)
        if (peer->dnsmgr)
                ast_dnsmgr_release(peer->dnsmgr);
 
        if (peer->dnsmgr)
                ast_dnsmgr_release(peer->dnsmgr);
 
+       if (peer->mwi_event_sub)
+               ast_event_unsubscribe(peer->mwi_event_sub);
+
        ast_string_field_free_pools(peer);
 }
 
        ast_string_field_free_pools(peer);
 }