[glib: 7/11] tests: Various minor leak fixes in the GLib tests



commit 6a22663d9af80aa68e32a809f69181f85cf905b3
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Jun 27 09:58:28 2018 +0100

    tests: Various minor leak fixes in the GLib tests
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/tests/option-context.c     | 1 +
 glib/tests/sequence.c           | 2 ++
 glib/tests/spawn-singlethread.c | 2 ++
 3 files changed, 5 insertions(+)
---
diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
index 60d3bd313..34ebfaaf6 100644
--- a/glib/tests/option-context.c
+++ b/glib/tests/option-context.c
@@ -2550,6 +2550,7 @@ double_free (void)
 
   g_option_context_free (context);
   g_clear_error (&error);
+  g_strfreev (argv);
 
 }
 
diff --git a/glib/tests/sequence.c b/glib/tests/sequence.c
index f01738f7f..8e74d090a 100644
--- a/glib/tests/sequence.c
+++ b/glib/tests/sequence.c
@@ -1379,6 +1379,8 @@ test_empty (void)
     }
 
   g_assert_true (g_sequence_is_empty (seq));
+
+  g_sequence_free (seq);
 }
 
 int
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index 212291b57..f7568ce98 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -394,6 +394,8 @@ test_spawn_nonexistent (void)
   g_assert_cmpint (exit_status, ==, -1);
 
   g_ptr_array_free (argv, TRUE);
+
+  g_clear_error (&error);
 }
 
 int


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