[glib/wip/menus-rebase2: 44/64] GMenuModel: fix 3 memory leaks
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/menus-rebase2: 44/64] GMenuModel: fix 3 memory leaks
- Date: Fri, 18 Nov 2011 16:29:07 +0000 (UTC)
commit 581d5d09276fe82fcacf04177961a9831e32f9d9
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Oct 22 19:03:31 2011 -0400
GMenuModel: fix 3 memory leaks
A matching pair in the markup printer and one in the testcase.
gio/gmenumarkup.c | 3 +++
gio/tests/gmenumodel.c | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/gmenumarkup.c b/gio/gmenumarkup.c
index fa589bf..8352be9 100644
--- a/gio/gmenumarkup.c
+++ b/gio/gmenumarkup.c
@@ -532,6 +532,8 @@ g_menu_markup_print_string (GString *string,
g_free (printed);
g_free (str);
}
+
+ g_variant_unref (value);
}
g_object_unref (attr_iter);
@@ -553,6 +555,7 @@ g_menu_markup_print_string (GString *string,
indent_string (contents, indent + tabstop);
g_string_append (contents, "</link>\n");
+ g_object_unref (menu);
}
g_object_unref (link_iter);
diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c
index 96e0c0e..77bbaa2 100644
--- a/gio/tests/gmenumodel.c
+++ b/gio/tests/gmenumodel.c
@@ -609,6 +609,7 @@ test_roundtrip (void)
g_object_unref (state.proxy);
g_menu_exporter_stop (G_MENU_MODEL (state.random));
g_object_unref (state.random);
+ g_rand_free (state.rand);
g_object_unref (bus);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]