Message ID | 20190413055409.GE19495@sigill.intra.peff.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | some fetch reachability-error fixes | expand |
diff --git a/fetch-pack.c b/fetch-pack.c index e69993b2eb..a181d3401d 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -630,10 +630,7 @@ static void filter_refs(struct fetch_pack_args *args, } oidset_clear(&tip_oids); - for (ref = unmatched; ref; ref = next) { - next = ref->next; - free(ref); - } + free_refs(unmatched); *refs = newlist; }
There's no need for us to write this loop manually when a helper function can already do it. Signed-off-by: Jeff King <peff@peff.net> --- fetch-pack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)