From 9af31fd10ab15182cb9c994c4d679aed72131ba6 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Thu, 28 Oct 2021 13:57:27 -0400 Subject: [PATCH] Fix a couple of cpu profile memory leaks --- v8go.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v8go.cc b/v8go.cc index 0f3bc1dc..f7d16606 100644 --- a/v8go.cc +++ b/v8go.cc @@ -286,6 +286,7 @@ void CPUProfileNodeDelete(CPUProfileNode* node) { CPUProfileNodeDelete(node->children[i]); } + delete[] node->children; delete node; } @@ -294,6 +295,7 @@ void CPUProfileDelete(CPUProfile* profile) { return; } profile->ptr->Delete(); + free((void *)profile->title); CPUProfileNodeDelete(profile->root);