[Asterisk-code-review] res_sorcery_memory_cache: stale item update leak (...asterisk[certified/16.3])
George Joseph
asteriskteam at digium.com
Tue Sep 24 08:45:14 CDT 2019
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/12923 )
Change subject: res_sorcery_memory_cache: stale item update leak
......................................................................
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
---
M res/res_sorcery_memory_cache.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c
index 42da727..5029131 100644
--- a/res/res_sorcery_memory_cache.c
+++ b/res/res_sorcery_memory_cache.c
@@ -1006,6 +1006,7 @@
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",
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12923
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: certified/16.3
Gerrit-Change-Id: I9d8173d3a0416a242f4eba92fa0853279c500ec7
Gerrit-Change-Number: 12923
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190924/7ba1b532/attachment.html>
More information about the asterisk-code-review
mailing list