diff options
author | Russell Belfer <rb@github.com> | 2013-12-07 03:04:31 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-12-11 22:57:49 +0400 |
commit | fcd324c625d8be3f368c924d787e945e5812d8dd (patch) | |
tree | ac1e54b2538cdc10ee17dfd7c887c35dd1f572bf /src/iterator.c | |
parent | dab89f9b6821b67dd07c8bd4dbb53e25a3e687c7 (diff) |
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.
Diffstat (limited to 'src/iterator.c')
-rw-r--r-- | src/iterator.c | 7 |
1 files changed, 1 insertions, 6 deletions
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); } |