public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] memory leaks in remote.c
@ 2026-01-19  5:18 Jeff King
  2026-01-19  5:19 ` [PATCH 1/4] remote: return non-const pointer from error_buf() Jeff King
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Jeff King @ 2026-01-19  5:18 UTC (permalink / raw)
  To: git; +Cc: Harald Nordgren

This fixes some memory leaks in remote.c. Not urgent, as they are quite
old, but they are newly triggered in the test suite by Harald's
hn/status-compare-with-push topic. So I think we'd want to build that
topic on top of these.

The first two are just preparatory cleanups. Patch 3 fixes the leak that
Harald's series triggers (and adds its own test, of course). Patch 4 is
a hypothetical leak that I don't think can be triggered in practice (so
it's more of a cleanup).

  [1/4]: remote: return non-const pointer from error_buf()
  [2/4]: remote: drop const return of tracking_for_push_dest()
  [3/4]: remote: fix leak in branch_get_push_1() with invalid "simple" config
  [4/4]: remote: always allocate branch.push_tracking_ref

 remote.c                | 24 ++++++++++++++----------
 remote.h                |  2 +-
 t/for-each-ref-tests.sh |  9 +++++++++
 3 files changed, 24 insertions(+), 11 deletions(-)

-Peff

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-01-20 20:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19  5:18 [PATCH 0/4] memory leaks in remote.c Jeff King
2026-01-19  5:19 ` [PATCH 1/4] remote: return non-const pointer from error_buf() Jeff King
2026-01-19  6:33   ` Patrick Steinhardt
2026-01-20  0:28     ` Junio C Hamano
2026-01-20 19:38       ` Jeff King
2026-01-20 20:18         ` Junio C Hamano
2026-01-19  5:20 ` [PATCH 2/4] remote: drop const return of tracking_for_push_dest() Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19  5:22 ` [PATCH 3/4] remote: fix leak in branch_get_push_1() with invalid "simple" config Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19  5:23 ` [PATCH 4/4] remote: always allocate branch.push_tracking_ref Jeff King
2026-01-19  6:34   ` Patrick Steinhardt
2026-01-19 15:04 ` Triangular workflow Harald Nordgren
2026-01-20 19:40   ` Jeff King
2026-01-20  0:31 ` [PATCH 0/4] memory leaks in remote.c Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox