From a2735ed025a066f64a84d890a3cfcf0e190bab65 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 16 Oct 2013 00:12:33 +0900 Subject: [PATCH] Fix leak on failure --- lib/nghttp2_hd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index b8379118..054944d3 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -1008,6 +1008,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_context *inflater, in = decode_length(&valuelen, in, last, 0); if(valuelen < 0 || in + valuelen > last) { + free(nv.name); rv = NGHTTP2_ERR_HEADER_COMP; goto fail; }