Commit 782402c2 by Patrick Steinhardt

tests: refs::iterator: fix memory leak due to ref names not being free'd

The test refs::iterator::foreach_name iterates through every reference
and copies its name into a local vector. While the test makes sure to
free the vector afterwards, the copied reference names are not being
free'd. Fix that.
parent 5963292f
......@@ -213,6 +213,7 @@ void test_refs_iterator__foreach_name(void)
git_vector_foreach(&output, i, name) {
cl_assert(refnames[i] != NULL);
cl_assert_equal_s(refnames[i], name);
git__free(name);
}
git_vector_free(&output);
......
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