diff options
author | Russell Belfer <rb@github.com> | 2013-12-06 15:04:31 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-12-11 10:57:49 -0800 |
commit | fcd324c625d8be3f368c924d787e945e5812d8dd (patch) | |
tree | ac1e54b2538cdc10ee17dfd7c887c35dd1f572bf /src/push.c | |
parent | dab89f9b6821b67dd07c8bd4dbb53e25a3e687c7 (diff) | |
download | libgit2-fcd324c625d8be3f368c924d787e945e5812d8dd.tar.gz |
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/push.c')
-rw-r--r-- | src/push.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/push.c b/src/push.c index e592249d9..a314922c1 100644 --- a/src/push.c +++ b/src/push.c @@ -541,10 +541,7 @@ static int queue_objects(git_push *push) error = 0; on_error: - git_vector_foreach(&commits, i, oid) - git__free(oid); - - git_vector_free(&commits); + git_vector_free_all(&commits); return error; } |