summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-04-13 05:54:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-15 05:00:51 (GMT)
commit259eddde6a861cbff8186f37170f09566730f8eb (patch)
tree3418f6c70c7e4c7af1bc01dfed8c943ae2c9621b
parent533ddba47e8cc36a6ec2864f482a8e540465eb64 (diff)
downloadgit-259eddde6a861cbff8186f37170f09566730f8eb.zip
git-259eddde6a861cbff8186f37170f09566730f8eb.tar.gz
git-259eddde6a861cbff8186f37170f09566730f8eb.tar.bz2
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>
-rw-r--r--fetch-pack.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index e69993b..a181d34 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;
}