From b06509c4f35212f097345bba7404b47da86b96c5 Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Thu, 27 Apr 2017 10:09:32 -0700 Subject: [PATCH] Fix a double-free encountered when failing to initialize a handle table bucket (#11244) * Fix a double-free encountered when failing to initialize a handle table bucket * Don't free m_bucket in the destructor of HandleTableBucketHolder --- src/gc/objecthandle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gc/objecthandle.cpp b/src/gc/objecthandle.cpp index dd43ec2..7df915f 100644 --- a/src/gc/objecthandle.cpp +++ b/src/gc/objecthandle.cpp @@ -608,7 +608,8 @@ HandleTableBucketHolder::~HandleTableBucketHolder() } delete [] m_bucket->pTable; } - delete m_bucket; + + // we do not own m_bucket, so we shouldn't delete it here. } bool Ref_Initialize() -- 2.7.4