From ac8096cf8487c2cd6f60f518ad812356f614367c Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:11:05 +0300 Subject: [PATCH] Fixed compilation error --- vm/ByteCodeTranslator/src/cn1_globals.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/ByteCodeTranslator/src/cn1_globals.m b/vm/ByteCodeTranslator/src/cn1_globals.m index ae0b3bb143..2d92595457 100644 --- a/vm/ByteCodeTranslator/src/cn1_globals.m +++ b/vm/ByteCodeTranslator/src/cn1_globals.m @@ -528,9 +528,9 @@ void placeObjectInHeapCollection(JAVA_OBJECT obj) { // the thread just died, mark its remaining resources void collectThreadResources(struct ThreadLocalData *current) { - if(threadStateData->utf8Buffer != 0) { - free(threadStateData->utf8Buffer); - threadStateData->utf8Buffer = 0; + if(current->utf8Buffer != 0) { + free(current->utf8Buffer); + current->utf8Buffer = 0; } for(int heapTrav = 0 ; heapTrav < current->heapAllocationSize ; heapTrav++) { JAVA_OBJECT obj = (JAVA_OBJECT)current->pendingHeapAllocations[heapTrav];