mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 14:36:48 +00:00
res_pjsip_mwi: Remove inappropriate topic unreference.
ast_mwi_topic() returns a borrowed reference which should not be unreferenced, doing so leads to a FRACK. This was hidden by the fact that stasis_cache.c leaked the result of cache_remove in caching_topic_exec. Change-Id: I51101bf7d07b8dc8ce8fc46b6cb31fbbd213fbc7
This commit is contained in:
@@ -868,7 +868,7 @@ static void caching_topic_exec(void *data, struct stasis_subscription *sub,
|
||||
ao2_wrlock(caching_topic->cache->entries);
|
||||
sub = cache_find(caching_topic->cache->entries, stasis_subscription_change_type(), change->uniqueid);
|
||||
if (sub) {
|
||||
cache_remove(caching_topic->cache->entries, sub, stasis_message_eid(message));
|
||||
ao2_cleanup(cache_remove(caching_topic->cache->entries, sub, stasis_message_eid(message)));
|
||||
ao2_cleanup(sub);
|
||||
}
|
||||
ao2_unlock(caching_topic->cache->entries);
|
||||
|
Reference in New Issue
Block a user