Thread (36 messages) 36 messages, 4 authors, 1d ago

Re: [PATCH v5 1/3] transport: add `transport_options_release()`

flat view

From: Patrick Steinhardt <hidden>
Date: 2026-10-28 11:42:26

On Wed, Oct 28, 2026 at 10:47:59AM +0100, Karthik Nayak wrote:
The `git_transport_options` structure is used both in 'transport.c' and
'transport-helper.c'. But while the former specifically clears any
associated data in the structure during the cleanup of the transport,
the latter misses this.

This means when using remote-helpers, data allocated for the structure
leaks. Introduce a new `transport_options_release()`, which acts as a
Nit: "a new transport_options_release" reads a bit weird. I'd either add
"function", or drop "a new".
common path to release memory allocated with the structure and use it in
both files.
Why didn't our CI detect this leak? Don't we have tests exercising this?

The patch itself looks obviously good to me, thanks.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help