aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/branch.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-10 17:12:10 -0400
committerJunio C Hamano <gitster@pobox.com>2023-07-10 14:48:55 -0700
commit311bfe18ce8563d0b1b571e9dc9eb35b97de3790 (patch)
tree5aabb2a74a8dd06565c005b7c7fe6bee991d9c3f /builtin/branch.c
parentref-filter.h: provide `REF_FILTER_INIT` (diff)
downloadgit-311bfe18ce8563d0b1b571e9dc9eb35b97de3790.tar.gz
git-311bfe18ce8563d0b1b571e9dc9eb35b97de3790.zip
ref-filter: clear reachable list pointers after freeing
In `reach_filter()`, we pop all commits from the reachable lists, leaving them empty. But because we're operating on a list pointer that was passed by value, the original `filter.reachable_from` and `filter.unreachable_from` pointers are left dangling. As is the case with the previous commit, nobody touches either of these fields after calling `reach_filter()`, so leaving them dangling is OK. But this future proofs against dangerous situations. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/branch.c')
0 files changed, 0 insertions, 0 deletions