[glib/wip/gcleanup: 70/79] param: Avoid g_test_add_data_func_full() which leaks
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup: 70/79] param: Avoid g_test_add_data_func_full() which leaks
- Date: Sun, 10 Nov 2013 15:25:24 +0000 (UTC)
commit 49103098f59b85b57d7d42f97c784c45e341e3a4
Author: Stef Walter <stefw gnome org>
Date: Fri Nov 8 08:48:02 2013 +0100
param: Avoid g_test_add_data_func_full() which leaks
It leaks on tests that have not been run. This is the case when
the g_test_subprocess mechanics are in use.
https://bugzilla.gnome.org/show_bug.cgi?id=711779
gobject/tests/param.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gobject/tests/param.c b/gobject/tests/param.c
index 5e11962..c317456 100644
--- a/gobject/tests/param.c
+++ b/gobject/tests/param.c
@@ -852,7 +852,8 @@ main (int argc, char *argv[])
data.change_this_flag, data.change_this_type,
data.use_this_flag, data.use_this_type);
test_data = g_memdup (&data, sizeof (TestParamImplementData));
- g_test_add_data_func_full (test_path, test_data, test_param_implement_child, g_free);
+ g_test_add_data_func (test_path, test_data, test_param_implement_child);
+ G_CLEANUP (test_data, g_free);
g_free (test_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]