1 Commits
Author SHA1 Message Date
Jens GeyerandClaude Opus 4.8 c194044c8d TEvhttpServer: free the request context on every processing path
Client: cpp

The completion callback was the only place that deleted the per-request
RequestContext, so a processor that threw before invoking that callback --
as an async dispatcher does on a body too short to parse a message header --
left the context and its buffers allocated. Hold the context in a
std::unique_ptr and release ownership to the callback only after
processor_->process() returns without throwing: the throw path frees it as
the stack unwinds, and the success path still deletes it exactly once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-22 01:45:32 +02:00