Skip to content

Commit 01e1b0f

Browse files
authored
Fix memory leak (#102)
1 parent 8df984f commit 01e1b0f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ETTrace/Tracer/EMGStackTraceRecorder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,7 @@ void EMGStackTraceRecorder::recordStackForAllThreads(bool recordAllThreads, thre
101101
size_t endIndex = addressStorage.size();
102102
emplaceResult.first->second.stacks.emplace_back(time, startIndex, endIndex);
103103
}
104+
if (recordAllThreads) {
105+
vm_deallocate(mach_task_self(), (vm_address_t) threads, sizeof(thread_t) * threadCount);
106+
}
104107
}

0 commit comments

Comments
 (0)