Plug leaks reported by valgrind. Same. Same Same. Same. Same.

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.
This commit is contained in:
Kjartan Maraas 2006-02-23 09:09:55 +00:00 committed by Kjartan Maraas
parent 27a4a3ab6f
commit a629b3f02d
9 changed files with 50 additions and 0 deletions

View 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:

View 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:

View 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:

View 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;
}

View 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",

View 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;
}

View 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

View 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;
}

View File

@ -221,6 +221,7 @@ run_to_uri_tests (void)
g_print ("Error message: %s\n", error->message);
any_failed = TRUE;
}
g_free (res);
}
}