diff options
author | Jeff King <peff@peff.net> | 2019-04-13 01:54:09 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-15 14:00:51 +0900 |
commit | 259eddde6a861cbff8186f37170f09566730f8eb (patch) | |
tree | 3418f6c70c7e4c7af1bc01dfed8c943ae2c9621b /fetch-pack.c | |
parent | 533ddba47e8cc36a6ec2864f482a8e540465eb64 (diff) | |
download | git-259eddde6a861cbff8186f37170f09566730f8eb.tar.gz |
fetch: use free_refs()
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 5 |
1 files changed, 1 insertions, 4 deletions
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; } |