Re: [PATCH 15/28] http: call git_inflate_end() when releasing http_object_request
- From
Jeff King <peff@peff.net>
- Date
- Sep 27, 2024, 03:51 UTC
- Message-ID
- <20240927035123.GE567395@coredump.intra.peff.net>
- In-Reply-To
- <ZvVmnCJNRY_V0a8a@pks.im>
On Thu, Sep 26, 2024 at 03:50:20PM +0200, Patrick Steinhardt wrote:
Show 13 quoted lines
> > We can't just add a git_inflate_end() call to the release function, > > though. That would double-free the cases that did actually finish. > > Instead, we'll move the call from the finish function to the release > > function. This does delay it for the cases that do finish, but I don't > > think it matters. We should have already reached Z_STREAM_END (and > > complain if we didn't), and we do not record any status code from > > git_inflate_end(). > > I had to read this paragraph multiple times to understand it, as I > wondered why you did end up adding it to `release_http_object_request()` > even though the paragraph claims that you cannot. But what you say is > that you must _move_ the call, not add it, and that's what the patch > does.
Yeah, I could see the confusion. It is really "We can't just add a git_inflate_end() call and be done. We must also...".
I don't think it's worth a re-roll on its own, but if I do re-roll I'll try to clarify.
-Peff