Commit b0b3b4e3 by nulltoken Committed by yorah

treebuilder: prevent git_treebuilder_free() from segfaulting when being passed a NULL treebuilder

parent 3a0d1e12
......@@ -634,6 +634,9 @@ void git_treebuilder_clear(git_treebuilder *bld)
void git_treebuilder_free(git_treebuilder *bld)
{
if (bld == NULL)
return;
git_treebuilder_clear(bld);
git_vector_free(&bld->entries);
git__free(bld);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment