[dconf/wip/reorg: 1/8] tests/: fix some leaks in testcases



commit 27f10aa6d3889b0c41a47c69d998a2102cdc6e07
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Jul 9 13:01:03 2012 -0400

    tests/: fix some leaks in testcases

 tests/gvdb.c   |    3 +++
 tests/shm.c    |    1 +
 tests/tmpdir.c |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/gvdb.c b/tests/gvdb.c
index 47b2b51..5ea91f0 100644
--- a/tests/gvdb.c
+++ b/tests/gvdb.c
@@ -333,6 +333,7 @@ test_nested (void)
   g_assert (has);
 
   gvdb_table_unref (table);
+  gvdb_table_unref (locks);
 }
 
 /* This function exercises the API against @table but does not do any
@@ -452,6 +453,8 @@ test_corrupted (gconstpointer user_data)
               g_clear_error (&error);
             }
         }
+
+      g_free (copy);
     }
   else
     {
diff --git a/tests/shm.c b/tests/shm.c
index 3d8b385..86e3b34 100644
--- a/tests/shm.c
+++ b/tests/shm.c
@@ -164,6 +164,7 @@ main (int argc, char **argv)
   status = g_test_run ();
 
   dconf_test_remove_tmpdir (temp);
+  g_free (temp);
 
   return status;
 }
diff --git a/tests/tmpdir.c b/tests/tmpdir.c
index b72d646..b8c8745 100644
--- a/tests/tmpdir.c
+++ b/tests/tmpdir.c
@@ -36,6 +36,7 @@ rm_rf (const gchar *file)
           g_free (fullname);
         }
 
+      g_dir_close (dir);
       g_rmdir (file);
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]