From 9c20f0e6494b03f6cea9441f8927156a5f81d99f Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Wed, 26 Aug 2020 18:22:59 -0500 Subject: [PATCH] Correct memory release function. l_name is populated by strdup which requires using free rather than delete. Change-Id: I9d9bdcfaa3ef095502270f332b95a0ee5c0bbcfc --- runtime/hsa-runtime/loader/executable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/hsa-runtime/loader/executable.cpp b/runtime/hsa-runtime/loader/executable.cpp index 6ca46154b2..0d6ce72ebf 100644 --- a/runtime/hsa-runtime/loader/executable.cpp +++ b/runtime/hsa-runtime/loader/executable.cpp @@ -207,7 +207,7 @@ static void RemoveCodeObjectInfoFromDebugMap(link_map* map) { map->l_next->l_prev = map->l_prev; } - delete map->l_name; + free(map->l_name); memset(map, 0, sizeof(link_map)); }