nghttp2_hd: Fix crash on fail

This commit is contained in:
Tatsuhiro Tsujikawa 2013-10-31 01:26:37 +09:00
parent e0fe939951
commit c8a9f8d312
1 changed files with 3 additions and 0 deletions

View File

@ -259,6 +259,9 @@ static int nghttp2_hd_context_init(nghttp2_hd_context *context,
return rv; return rv;
} }
context->emit_set = NULL;
context->buf_track = NULL;
if(role == NGHTTP2_HD_ROLE_INFLATE) { if(role == NGHTTP2_HD_ROLE_INFLATE) {
context->emit_set = malloc(sizeof(nghttp2_hd_entry*)* context->emit_set = malloc(sizeof(nghttp2_hd_entry*)*
NGHTTP2_INITIAL_EMIT_SET_SIZE); NGHTTP2_INITIAL_EMIT_SET_SIZE);