diff options
| author | Jeff King <peff@peff.net> | 2023-07-10 17:12:10 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-10 14:48:55 -0700 |
| commit | 311bfe18ce8563d0b1b571e9dc9eb35b97de3790 (patch) | |
| tree | 5aabb2a74a8dd06565c005b7c7fe6bee991d9c3f /builtin/branch.c | |
| parent | ref-filter.h: provide `REF_FILTER_INIT` (diff) | |
| download | git-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
