From 1e54c241322c0f65c569bc20529e2275ec361428 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 15 Jun 2018 02:15:04 +0200 Subject: http2: fix memory leak for uncommon headers Fix a memory leak that occurs with header names that are short and not present in the static table of default headers. PR-URL: https://github.com/nodejs/node/pull/21336 Reviewed-By: Anatoli Papirovski Reviewed-By: James M Snell Reviewed-By: Minwoo Jung Reviewed-By: Richard Lau Reviewed-By: Tiancheng "Timothy" Gu --- src/node_http2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node_http2.h') diff --git a/src/node_http2.h b/src/node_http2.h index 70c284c357..a046ade0fd 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -1203,6 +1203,7 @@ class ExternalHeader : } if (may_internalize && vec.len < 64) { + nghttp2_rcbuf_decref(buf); // This is a short header name, so there is a good chance V8 already has // it internalized. return GetInternalizedString(env, vec); -- cgit v1.2.3