From c8a9f8d312a35545711e2566cb503121db7d9991 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 31 Oct 2013 01:26:37 +0900 Subject: [PATCH] nghttp2_hd: Fix crash on fail --- lib/nghttp2_hd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index c0b185eb..1a0e5a3c 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -259,6 +259,9 @@ static int nghttp2_hd_context_init(nghttp2_hd_context *context, return rv; } + context->emit_set = NULL; + context->buf_track = NULL; + if(role == NGHTTP2_HD_ROLE_INFLATE) { context->emit_set = malloc(sizeof(nghttp2_hd_entry*)* NGHTTP2_INITIAL_EMIT_SET_SIZE);