From: Paulo Zanoni <[email protected]>
If CAIRO_TESTS is set, argv will be replaced by a xmaloc'ed variable. We
need to free it.
This can be easily detected by running:
CAIRO_TESTS=user-font make check-valgrind TARGETS=image
Signed-off-by: Paulo Zanoni <[email protected]>
---
Makes it easier to debug leaks in the actual tests.
test/cairo-test-runner.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index 4afcafc..58e4045 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -715,6 +715,7 @@ main (int argc, char **argv)
unsigned int n, m;
char targets[4096];
int len;
+ char *cairo_tests_env;
#ifdef _MSC_VER
/* We don't want an assert dialog, we want stderr */
@@ -752,7 +753,9 @@ main (int argc, char **argv)
}
_parse_cmdline (&runner, &argc, &argv);
- append_argv (&argc, &argv, getenv ("CAIRO_TESTS"));
+
+ cairo_tests_env = getenv("CAIRO_TESTS");
+ append_argv (&argc, &argv, cairo_tests_env);
if (runner.full_test) {
runner.num_device_offsets = 2;
@@ -1072,6 +1075,9 @@ main (int argc, char **argv)
}
+ if (cairo_tests_env)
+ free(argv);
+
if (runner.list_only) {
printf ("\n");
return CAIRO_TEST_SUCCESS;
--
1.7.4.1
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.