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
pull/15/head
Kevin Harwell 6 years ago
parent e79a3b428a
commit a4caaef64c

@ -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",

Loading…
Cancel
Save