mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
res_sorcery_memory_cache: stale item update leak
When a stale item was being updated the object was being retrieved, but its reference was not being decremented after the update. This patch makes it so the object is now appropriately de-referenced. ASTERISK-28523 Change-Id: I9d8173d3a0416a242f4eba92fa0853279c500ec7
This commit is contained in:
@@ -1006,6 +1006,7 @@ static int stale_item_update(const void *data)
|
||||
ast_sorcery_object_get_id(task_data->object));
|
||||
sorcery_memory_cache_create(task_data->sorcery, task_data->cache,
|
||||
object);
|
||||
ao2_ref(object, -1);
|
||||
}
|
||||
|
||||
ast_test_suite_event_notify("SORCERY_MEMORY_CACHE_REFRESHED", "Cache: %s\r\nType: %s\r\nName: %s\r\n",
|
||||
|
Reference in New Issue
Block a user