diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-04 03:21:56 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-04 03:21:56 +0400 |
commit | 323bb88514347ebb7a1d760490384b305f4f4d92 (patch) | |
tree | e7529d3e16050b69af146479c66d70647290675e /tests-clar/stash | |
parent | dce5f26f4d72b024891e70f6130e63389d9f181a (diff) |
Fix a few leaks
`git_diff_get_patch()` would unconditionally load the patch object and
then simply leak it if the user hadn't requested it. Short-circuit
loading the object if the user doesn't want it.
The rest of the plugs are simply calling the free functions of objects
allocated during the tests.
Diffstat (limited to 'tests-clar/stash')
-rw-r--r-- | tests-clar/stash/drop.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests-clar/stash/drop.c b/tests-clar/stash/drop.c index 1eb42c029..d171390da 100644 --- a/tests-clar/stash/drop.c +++ b/tests-clar/stash/drop.c @@ -169,4 +169,6 @@ void test_stash_drop__dropping_the_top_stash_updates_the_stash_reference(void) cl_assert_equal_i( true, git_oid_cmp(&oid, git_object_id(next_top_stash)) == 0); + + git_object_free(next_top_stash); } |