git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Karthik Nayak <karthik.188@gmail.com>
Date
Oct 29, 2026, 10:02 UTC
Message-ID
<CAOLa=ZRr2X58KqC75uqqrb73ALuP=KRPkNMuEM-oAqPkfe4X1g@mail.gmail.com>
In-Reply-To
<auL-r__SD8m3it5h@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 34 quoted lines
> On Wed, Oct 28, 2026 at 04:18:11PM -0400, Karthik Nayak wrote:
>> Patrick Steinhardt <ps@pks.im> writes:
>>
>> > 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".
>> >
>>
>> Fair enough, I'll drop the '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
>>
>> We don't have any tests which exercise this it seems. The tests in the
>> next patch do, which is why it hit the bug!
>
> That would have been great to point out in the commit message :) Thanks
> for clarifying!
>
> Patrick
Let me push a new version with all these fixes. Thanks for the review
Previous: Patrick SteinhardtNext: Karthik Nayak
Message 27 of 36 in “fetch: commit references fetched before backfilling tags”
  1. fetch: commit references fetched before backfilling tagsKarthik Nayak, Oct 8, 2026
  2. Patrick SteinhardtOct 9, 2026
  3. Justin ToblerOct 9, 2026
  4. Karthik NayakOct 9, 2026
  5. Karthik NayakOct 9, 2026
  6. fetch: commit references fetched before backfilling tagsKarthik Nayak, Oct 12, 2026
  7. Junio C HamanoOct 12, 2026
  8. Karthik NayakOct 15, 2026
  9. fetch: commit references fetched before backfilling tagsKarthik Nayak, Oct 15, 2026
  10. Justin ToblerOct 20, 2026
  11. Patrick SteinhardtOct 21, 2026
  12. Karthik NayakOct 21, 2026
  13. Justin ToblerOct 21, 2026
  14. Karthik NayakOct 22, 2026
  15. Karthik NayakOct 21, 2026
  16. fetch: advertise fetched refs when backfilling tagsKarthik Nayak, Oct 22, 2026
  17. Patrick SteinhardtOct 23, 2026
  18. Karthik NayakOct 23, 2026
  19. Patrick SteinhardtOct 23, 2026
  20. Karthik NayakOct 23, 2026
  21. Karthik NayakOct 23, 2026
  22. 0/3 fetch: advertise fetched refs when backfilling tagsKarthik Nayak, Oct 28, 2026
  23. 1/3 transport: add `transport_options_release()`Karthik Nayak, Oct 28, 2026
  24. Patrick SteinhardtOct 28, 2026
  25. Karthik NayakOct 28, 2026
  26. Patrick SteinhardtOct 29, 2026
  27. Karthik NayakOct 29, 2026
  28. 2/3 fetch: advertise fetched refs when backfilling tagsKarthik Nayak, Oct 28, 2026
  29. 3/3 t5510: cover upstream info update on fetch failureKarthik Nayak, Oct 28, 2026
  30. Patrick SteinhardtOct 28, 2026
  31. Karthik NayakOct 28, 2026
  32. 0/3 fetch: advertise fetched refs when backfilling tagsKarthik Nayak, Oct 29, 2026
  33. 1/3 t5510: cover upstream info update on fetch failureKarthik Nayak, Oct 29, 2026
  34. 2/3 transport: add `transport_options_release()`Karthik Nayak, Oct 29, 2026
  35. 3/3 fetch: advertise fetched refs when backfilling tagsKarthik Nayak, Oct 29, 2026
  36. Patrick SteinhardtOct 29, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.