From 73222e3696bb4d2408cb703fde7f843b126e76a3 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 9 Dec 2025 16:24:39 +0100 Subject: [PATCH] revert streams having their own allocator Problems reports in PR 69899 by users. --- ChangeLog | 2 ++ mod_http2/h2_session.c | 22 +++------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36c271e8..9bf506c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * Revert change from v2.0.33 that gave streams their own memory + allocator after report of problems in PR 69899. * Hardening: use nghttp2 supplied length when checking trailers. v2.0.35 diff --git a/mod_http2/h2_session.c b/mod_http2/h2_session.c index 21ede5c1..dda6c771 100644 --- a/mod_http2/h2_session.c +++ b/mod_http2/h2_session.c @@ -111,31 +111,15 @@ static void cleanup_unprocessed_streams(h2_session *session) h2_mplx_c1_streams_do(session->mplx, rst_unprocessed_stream, session); } -/* APR callback invoked if allocation fails. */ -static int abort_on_oom(int retcode) -{ - ap_abort_on_oom(); - return retcode; /* unreachable, hopefully. */ -} - static h2_stream *h2_session_open_stream(h2_session *session, int stream_id, int initiated_on) { h2_stream * stream; - apr_allocator_t *allocator; apr_pool_t *stream_pool; - apr_status_t rv; - - rv = apr_allocator_create(&allocator); - if (rv != APR_SUCCESS) - return NULL; - - apr_allocator_max_free_set(allocator, ap_max_mem_free); - apr_pool_create_ex(&stream_pool, session->pool, NULL, allocator); - apr_allocator_owner_set(allocator, stream_pool); - apr_pool_abort_set(abort_on_oom, stream_pool); + + apr_pool_create(&stream_pool, session->pool); apr_pool_tag(stream_pool, "h2_stream"); - + stream = h2_stream_create(stream_id, stream_pool, session, session->monitor, initiated_on); if (stream) {