Skip to content
Snippets Groups Projects
Unverified Commit dca78626 authored by Tomas Krizek's avatar Tomas Krizek Committed by Lukas Jezek
Browse files

daemon/http: additional guards from memleaks

parent 2cdec753
Branches
Tags
1 merge request!1164daemon/http: improve handling of stream errors
Pipeline #79690 failed with stages
in 56 minutes and 51 seconds
......@@ -275,6 +275,7 @@ static int begin_headers_callback(nghttp2_session *h2, const nghttp2_frame *fram
"[http] stream %d incomplete, refusing\n", ctx->incomplete_stream);
refuse_stream(h2, stream_id);
} else {
http_cleanup_stream(ctx); // Free any leftover data and ensure pristine state
ctx->incomplete_stream = stream_id;
}
return 0;
......@@ -675,6 +676,7 @@ void http_free(struct http_ctx *ctx)
if (!ctx)
return;
http_cleanup_stream(ctx);
queue_deinit(ctx->streams);
nghttp2_session_del(ctx->h2);
free(ctx);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment