Commit 2dd55c3d477 for nodejs
commit 2dd55c3d477612736f5e6c980b35dcc6986b5dba
Author: Tim Perry <pimterry@gmail.com>
Date: Thu Nov 26 19:01:46 2026 +0100
quic: fix eternal handle leak for HTTP/3 known header names
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67758
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/src/node_http_common-inl.h b/src/node_http_common-inl.h
index 339e5a61231..f37830fe516 100644
--- a/src/node_http_common-inl.h
+++ b/src/node_http_common-inl.h
@@ -157,7 +157,7 @@ v8::MaybeLocal<v8::String> NgHeader<T>::GetName(
// a statically defined name. We can safely internalize it here.
if (header_name != nullptr) {
auto& static_str_map = env_->isolate_data()->static_str_map;
- v8::Eternal<v8::String> eternal = static_str_map[header_name];
+ v8::Eternal<v8::String>& eternal = static_str_map[header_name];
if (eternal.IsEmpty()) {
v8::Local<v8::String> str = OneByteString(env_->isolate(), header_name);
eternal.Set(env_->isolate(), str);