summaryrefslogtreecommitdiff
path: root/tests/t0902-modify.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-10-28 02:07:18 +0300
committerVicent Marti <tanoku@gmail.com>2010-10-28 02:07:18 +0300
commit585190183b47dc991605abcfbe3afb57220a0f29 (patch)
treef8a1f2572f667296a5b5121c64c74bb353557c93 /tests/t0902-modify.c
parent2d16373cb8d8c22b3ec99a6936b82821e99e64a5 (diff)
downloadlibgit2-585190183b47dc991605abcfbe3afb57220a0f29.tar.gz
Fix internal memory management on the library
String mememory is now managed in a much more sane manner. Fixes include: - git_person email and name is no longer limited to 64 characters - git_tree_entry filename is no longer limited to 255 characters - raw objects are properly opened & closed the minimum amount of times required for parsing - unit tests no longer leak - removed 5 other misc memory leaks as reported by Valgrind - tree writeback no longer segfaults on rare ocassions The git_person struct is no longer public. It is now managed by the library, and getter methods are in place to access its internal attributes. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests/t0902-modify.c')
-rw-r--r--tests/t0902-modify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/t0902-modify.c b/tests/t0902-modify.c
index 60a5cd728..67ae1fa64 100644
--- a/tests/t0902-modify.c
+++ b/tests/t0902-modify.c
@@ -38,6 +38,8 @@ BEGIN_TEST(tree_in_memory_add_test)
must_pass(git_object_write((git_object *)tree));
must_pass(remove_loose_object(odb_dir, (git_object *)tree));
+ git_object_free((git_object *)tree);
+
git_repository_free(repo);
git_odb_close(db);
END_TEST
@@ -91,6 +93,8 @@ BEGIN_TEST(tree_add_entry_test)
*/
must_pass(remove_loose_object(odb_dir, (git_object *)tree));
+
+ git_object_free((git_object *)tree);
git_repository_free(repo);
git_odb_close(db);