From: Junio C Hamano Date: Tue, 20 Jan 2026 00:31:40 GMT Subject: Re: [PATCH 0/4] memory leaks in remote.c Message-ID: In-Reply-To: <20260119051858.GA1991308@coredump.intra.peff.net> Jeff King writes: > 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(-) All look sensible. Will queue. Thanks.