Plug leaks reported by valgrind. Same. Same Same. Same. Same.
authorKjartan Maraas <kmaraas@gnome.org>
Thu, 23 Feb 2006 09:09:55 +0000 (09:09 +0000)
committerKjartan Maraas <kmaraas@src.gnome.org>
Thu, 23 Feb 2006 09:09:55 +0000 (09:09 +0000)
2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>

* tests/completion-test.c: (main): Plug leaks reported by
valgrind.
* tests/convert-test.c: (test_iconv_state), (test_one_half):
Same.
* tests/patterntest.c: (test_compilation): Same
* tests/shell-test.c: (do_argv_test): Same.
* tests/unicode-caseconv.c: (main): Same.
* tests/uri-test.c: (run_to_uri_tests): Same.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
tests/completion-test.c
tests/convert-test.c
tests/patterntest.c
tests/shell-test.c
tests/unicode-caseconv.c
tests/uri-test.c

index 4dd099d..5a3dc7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>
+
+       * tests/completion-test.c: (main): Plug leaks reported by
+       valgrind.
+       * tests/convert-test.c: (test_iconv_state), (test_one_half):
+       Same.
+       * tests/patterntest.c: (test_compilation): Same
+       * tests/shell-test.c: (do_argv_test): Same.
+       * tests/unicode-caseconv.c: (main): Same.
+       * tests/uri-test.c: (run_to_uri_tests): Same.
+       Closes bug #332093.
+
 2006-02-19  Martyn Russell  <martyn@imendio.com>
        
        * tests/asyncqueue-test.c: 
index 4dd099d..5a3dc7d 100644 (file)
@@ -1,3 +1,15 @@
+2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>
+
+       * tests/completion-test.c: (main): Plug leaks reported by
+       valgrind.
+       * tests/convert-test.c: (test_iconv_state), (test_one_half):
+       Same.
+       * tests/patterntest.c: (test_compilation): Same
+       * tests/shell-test.c: (do_argv_test): Same.
+       * tests/unicode-caseconv.c: (main): Same.
+       * tests/uri-test.c: (run_to_uri_tests): Same.
+       Closes bug #332093.
+
 2006-02-19  Martyn Russell  <martyn@imendio.com>
        
        * tests/asyncqueue-test.c: 
index 4dd099d..5a3dc7d 100644 (file)
@@ -1,3 +1,15 @@
+2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>
+
+       * tests/completion-test.c: (main): Plug leaks reported by
+       valgrind.
+       * tests/convert-test.c: (test_iconv_state), (test_one_half):
+       Same.
+       * tests/patterntest.c: (test_compilation): Same
+       * tests/shell-test.c: (do_argv_test): Same.
+       * tests/unicode-caseconv.c: (main): Same.
+       * tests/uri-test.c: (run_to_uri_tests): Same.
+       Closes bug #332093.
+
 2006-02-19  Martyn Russell  <martyn@imendio.com>
        
        * tests/asyncqueue-test.c: 
index 50cfc95..88d2986 100644 (file)
@@ -58,5 +58,7 @@ int main (int argc, char *argv[])
   g_assert (!strcmp ("b", prefix));
   g_free (prefix);
 
+  g_completion_free (cmp);
+
   return 0;
 }
index 87d57b2..a24a9e2 100644 (file)
@@ -49,6 +49,7 @@ test_iconv_state (void)
   g_assert (bytes_read == 5);
   g_assert (bytes_written == 10);
   g_assert (strcmp (out, expected) == 0);
+  g_free (out);
 }
 
 /* some tests involving "vulgar fraction one half" */
@@ -82,6 +83,7 @@ test_one_half (void)
   g_assert (bytes_written == 0);
   g_assert (out == NULL);
   g_clear_error (&error);
+  g_free (out);
 
   out = g_convert_with_fallback (in, -1, 
                                 "ISO8859-15", "UTF-8",
index aceeb5d..494de17 100644 (file)
@@ -105,6 +105,7 @@ test_compilation (gchar *src,
       g_print ("failed \t(match_type: %s, expected %s)\n",
               match_type_name (spec->match_type), 
               match_type_name (match_type));
+      g_pattern_spec_free (spec);
       return FALSE;
     }
   
@@ -113,6 +114,7 @@ test_compilation (gchar *src,
       g_print ("failed \t(pattern: \"%s\", expected \"%s\")\n",
               spec->pattern,
               pattern);
+      g_pattern_spec_free (spec);
       return FALSE;
     }
   
@@ -121,6 +123,7 @@ test_compilation (gchar *src,
       g_print ("failed \t(pattern_length: %d, expected %d)\n",
               spec->pattern_length,
               (gint)strlen (spec->pattern));
+      g_pattern_spec_free (spec);
       return FALSE;
     }
   
@@ -129,12 +132,15 @@ test_compilation (gchar *src,
       g_print ("failed \t(min_length: %d, expected %d)\n",
               spec->min_length,
               min);
+      g_pattern_spec_free (spec);
       return FALSE;
     }
   
   verbose ("passed (%s: \"%s\")\n",
           match_type_name (spec->match_type),
           spec->pattern);
+
+  g_pattern_spec_free (spec);
   
   return TRUE;
 }
index 3762cb4..437f20e 100644 (file)
@@ -161,6 +161,7 @@ do_argv_test (const gchar *cmdline, const TestResult *result)
       fprintf (stderr, "argv didn't get NULL-terminated\n");
       exit (1);
     }
+  g_strfreev (argv);
 }
 
 static void
index 8b949d4..77d8a9b 100644 (file)
@@ -88,6 +88,7 @@ int main (int argc, char **argv)
   if (!infile)
     {
       fprintf (stderr, "Failed to open %s\n", filename );
+      g_free (filename);
       exit (1);
     }
   
@@ -114,6 +115,7 @@ int main (int argc, char **argv)
     }
 
   fclose (infile);
+  g_free (filename);
 
   return result;
 }
index c0f21b0..340d774 100644 (file)
@@ -221,6 +221,7 @@ run_to_uri_tests (void)
            g_print ("Error message: %s\n", error->message);
          any_failed = TRUE;
        }
+      g_free (res);
     }
 }