diff options
author | Jeff King <peff@peff.net> | 2023-07-11 00:12:10 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-11 00:48:55 +0300 |
commit | 311bfe18ce8563d0b1b571e9dc9eb35b97de3790 (patch) | |
tree | 5aabb2a74a8dd06565c005b7c7fe6bee991d9c3f /ref-filter.h | |
parent | b9f7daa6ef52ad8894b5f730eaee0599668d66d5 (diff) |
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 'ref-filter.h')
0 files changed, 0 insertions, 0 deletions