]> git.ipfire.org Git - thirdparty/git.git/commit
remote: fix leak in reachability check of a remote-tracking ref
authorPatrick Steinhardt <ps@pks.im>
Thu, 5 Sep 2024 10:09:01 +0000 (12:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Sep 2024 15:49:11 +0000 (08:49 -0700)
commit42c153e1c06fcfea8446f11bf3fc3bcf9ea25867
treec7d73b7c50293414585b1f71434f33d509363053
parentcdbb7208c80661754b3f1a73aef086c08f88dcff
remote: fix leak in reachability check of a remote-tracking ref

In `check_if_includes_upstream()` we retrieve the local ref
corresponding to a remote-tracking ref we want to check reachability
for. We never free that local ref and thus cause a memory leak. Fix
this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c
t/t5533-push-cas.sh