[nautilus/wip/gaction_: 33/38] ui-utilities: plug some memory leaks
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gaction_: 33/38] ui-utilities: plug some memory leaks
- Date: Wed, 21 Jan 2015 13:21:33 +0000 (UTC)
commit 974da70ff2f0e25789afaf75f728f72027a53fa0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 20 14:19:18 2015 -0800
ui-utilities: plug some memory leaks
libnautilus-private/nautilus-ui-utilities.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-ui-utilities.c b/libnautilus-private/nautilus-ui-utilities.c
index a8f6fc4..388b9b7 100644
--- a/libnautilus-private/nautilus-ui-utilities.c
+++ b/libnautilus-private/nautilus-ui-utilities.c
@@ -63,12 +63,16 @@ find_gmenu_model (GMenuModel *model,
j_items = g_menu_model_get_n_items (submodel);
for (j = 0; j < j_items; j++) {
submenu = g_menu_model_get_item_link (submodel, j, G_MENU_LINK_SUBMENU);
- if (submenu)
+ if (submenu) {
insertion_model = find_gmenu_model (submenu, model_id);
+ g_object_unref (submenu);
+ }
if (insertion_model)
break;
}
+
+ g_object_unref (submodel);
}
g_free (id);
@@ -109,6 +113,8 @@ nautilus_gmenu_merge (GMenu *original,
g_menu_append_item (G_MENU (submodel), item);
g_object_unref (item);
}
+
+ g_object_unref (submodel);
}
/*
@@ -133,6 +139,8 @@ nautilus_gmenu_add_item_in_submodel (GMenu *menu,
g_menu_prepend_item (G_MENU (submodel), item);
else
g_menu_append_item (G_MENU (submodel), item);
+
+ g_object_unref (submodel);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]