From 8a643ad166fc1dbad915b47864e002a6c89bd216 Mon Sep 17 00:00:00 2001 From: nemoyuan Date: Mon, 2 Aug 2021 17:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20for=20Stack::Resize=20capa?= =?UTF-8?q?city=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/include/opentelemetry/context/runtime_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/include/opentelemetry/context/runtime_context.h b/api/include/opentelemetry/context/runtime_context.h index d648362cee..5cb793b23a 100644 --- a/api/include/opentelemetry/context/runtime_context.h +++ b/api/include/opentelemetry/context/runtime_context.h @@ -294,7 +294,8 @@ class ThreadLocalContextStorage : public RuntimeContextStorage } delete[] base_; } - base_ = temp; + base_ = temp; + capacity_ = new_capacity; } ~Stack() noexcept { delete[] base_; }