Skip to content

Commit

Permalink
HTTP/2: fixed a segfault while processing unbuffered upload.
Browse files Browse the repository at this point in the history
The ngx_http_v2_finalize_connection() closes current stream, but that is an
invalid operation while processing unbuffered upload.  This results in access
to already freed memory, since the upstream module sets a cleanup handler that
also finalizes the request.
  • Loading branch information
VBart committed Jun 16, 2016
1 parent ab8504b commit 24d9b98
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/http/v2/ngx_http_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4169,10 +4169,6 @@ ngx_http_v2_finalize_connection(ngx_http_v2_connection_t *h2c,

c->error = 1;

if (h2c->state.stream) {
ngx_http_v2_close_stream(h2c->state.stream, NGX_HTTP_BAD_REQUEST);
}

if (!h2c->processing) {
ngx_http_close_connection(c);
return;
Expand Down

0 comments on commit 24d9b98

Please sign in to comment.