]> git.proxmox.com Git - libgit2.git/commitdiff
Plug a couple of leaks
authorCarlos Martín Nieto <cmn@dwim.me>
Sat, 20 Apr 2013 14:20:21 +0000 (16:20 +0200)
committerCarlos Martín Nieto <cmn@dwim.me>
Sat, 20 Apr 2013 14:20:33 +0000 (16:20 +0200)
tests-clar/stash/drop.c

index 12f922630659a693d58ef3fd76bd6de582e2af44..60b3c72e0ce5e255a1874cb2cc4766666bf84a56 100644 (file)
@@ -146,6 +146,8 @@ void retrieve_top_stash_id(git_oid *out)
        cl_git_pass(git_reference_name_to_id(out, repo, GIT_REFS_STASH_FILE));
 
        cl_assert_equal_i(true, git_oid_cmp(out, git_object_id(top_stash)) == 0);
+
+       git_object_free(top_stash);
 }
 
 void test_stash_drop__dropping_the_top_stash_updates_the_stash_reference(void)
@@ -165,4 +167,6 @@ void test_stash_drop__dropping_the_top_stash_updates_the_stash_reference(void)
        retrieve_top_stash_id(&oid);
 
        cl_git_pass(git_oid_cmp(&oid, git_object_id(next_top_stash)));
+
+       git_object_free(next_top_stash);
 }