summaryrefslogtreecommitdiff
path: root/src/vector.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2011-12-16 10:56:43 -0800
committerRussell Belfer <arrbee@arrbee.com>2011-12-20 16:32:58 -0800
commitee1f0b1aed7798908d9e038b006b66f868613fc3 (patch)
treec60350029b9e4bb14811ac13caf59ad86424f33e /src/vector.c
parentbe00b00dd1468f1c625ca3fadc61f2a16edfb8d5 (diff)
downloadlibgit2-ee1f0b1aed7798908d9e038b006b66f868613fc3.tar.gz
Add APIs for git attributes
This adds APIs for querying git attributes. In addition to the new API in include/git2/attr.h, most of the action is in src/attr_file.[hc] which contains utilities for dealing with a single attributes file, and src/attr.[hc] which contains the implementation of the APIs that merge all applicable attributes files.
Diffstat (limited to 'src/vector.c')
-rw-r--r--src/vector.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vector.c b/src/vector.c
index 123aae8e6..e745d77dd 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -29,7 +29,12 @@ static int resize_vector(git_vector *v)
void git_vector_free(git_vector *v)
{
assert(v);
+
git__free(v->contents);
+ v->contents = NULL;
+
+ v->length = 0;
+ v->_alloc_size = 0;
}
int git_vector_init(git_vector *v, unsigned int initial_size, git_vector_cmp cmp)