lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [1/4] lucy-clownfish git commit: Plug memory leaks in HashIterator tests
Date Thu, 16 Apr 2015 20:42:29 GMT
Repository: lucy-clownfish
Updated Branches:
  refs/heads/CLOWNFISH-2-hash-iterator [created] fa3b08b80


Plug memory leaks in HashIterator tests


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/0b27c67a
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/0b27c67a
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/0b27c67a

Branch: refs/heads/CLOWNFISH-2-hash-iterator
Commit: 0b27c67a14fa960b817281e0b593ba15586b5801
Parents: f030723
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Thu Apr 16 21:37:11 2015 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu Apr 16 21:37:11 2015 +0200

----------------------------------------------------------------------
 runtime/core/Clownfish/Test/TestHashIterator.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/0b27c67a/runtime/core/Clownfish/Test/TestHashIterator.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestHashIterator.c b/runtime/core/Clownfish/Test/TestHashIterator.c
index 6031c68..98c9ebf 100644
--- a/runtime/core/Clownfish/Test/TestHashIterator.c
+++ b/runtime/core/Clownfish/Test/TestHashIterator.c
@@ -129,10 +129,12 @@ test_Get_Key_and_Get_Value(TestBatchRunner *runner) {
     Err *get_key_error = Err_trap(S_invoke_Get_Key, iter);
     TEST_TRUE(runner, get_key_error != NULL,
               "Get_Key throws exception before first call to Next.");
+    DECREF(get_key_error);
 
     Err *get_value_error = Err_trap(S_invoke_Get_Value, iter);
     TEST_TRUE(runner, get_value_error != NULL,
               "Get_Value throws exception before first call to Next.");
+    DECREF(get_value_error);
 
     HashIter_Next(iter);
     TEST_TRUE(runner, HashIter_Get_Key(iter), "Get_Key during iteration.");
@@ -202,6 +204,7 @@ test_tombstone(TestBatchRunner *runner) {
         TEST_TRUE(runner, !HashIter_Next(iter), "Next advances past tombstones.");
 
         DECREF(iter);
+        DECREF(hash);
     }
 
     {
@@ -221,6 +224,7 @@ test_tombstone(TestBatchRunner *runner) {
 
         DECREF(str);
         DECREF(iter);
+        DECREF(hash);
     }
 }
 


Mime
View raw message