From fcd324c625d8be3f368c924d787e945e5812d8dd Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Fri, 6 Dec 2013 15:04:31 -0800 Subject: Add git_vector_free_all There are a lot of places that we call git__free on each item in a vector and then call git_vector_free on the vector itself. This just wraps that up into one convenient helper function. --- src/iterator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/iterator.c') diff --git a/src/iterator.c b/src/iterator.c index c1292227c..118bbb880 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -920,12 +920,7 @@ static fs_iterator_frame *fs_iterator__alloc_frame(fs_iterator *fi) static void fs_iterator__free_frame(fs_iterator_frame *ff) { - size_t i; - git_path_with_stat *path; - - git_vector_foreach(&ff->entries, i, path) - git__free(path); - git_vector_free(&ff->entries); + git_vector_free_all(&ff->entries); git__free(ff); } -- cgit v1.2.3