Merge lp:~charlesk/unity-gtk-module/lp-1199123 into lp:unity-gtk-module/13.10

Proposed by Charles Kerr
Status: Merged
Approved by: William Hua
Approved revision: 299
Merged at revision: 299
Proposed branch: lp:~charlesk/unity-gtk-module/lp-1199123
Merge into: lp:unity-gtk-module/13.10
Diff against target: 28 lines (+5/-2)
1 file modified
lib/unity-gtk-menu-shell.c (+5/-2)
To merge this branch: bzr merge lp:~charlesk/unity-gtk-module/lp-1199123
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
William Hua (community) Approve
Review via email: mp+173582@code.launchpad.net

Commit message

in lib/unity-gtk-menu-shell.c's unity_gtk_menu_shell_get_items(), plug a GList leak.

Description of the change

in lib/unity-gtk-menu-shell.c's unity_gtk_menu_shell_get_items(), plug a GList leak.

To post a comment you must log in.
Revision history for this message
William Hua (attente) wrote :

Thanks for the catch!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/unity-gtk-menu-shell.c'
2--- lib/unity-gtk-menu-shell.c 2013-02-19 11:55:57 +0000
3+++ lib/unity-gtk-menu-shell.c 2013-07-08 19:56:33 +0000
4@@ -121,19 +121,22 @@
5
6 if (shell->items == NULL)
7 {
8+ GList *children;
9 GList *iter;
10 guint i;
11
12 g_return_val_if_fail (shell->menu_shell != NULL, NULL);
13
14 shell->items = g_ptr_array_new_with_free_func (g_object_unref);
15- iter = gtk_container_get_children (GTK_CONTAINER (shell->menu_shell));
16+ children = gtk_container_get_children (GTK_CONTAINER (shell->menu_shell));
17
18- for (i = 0; iter != NULL; i++)
19+ for (iter = children, i = 0; iter != NULL; i++)
20 {
21 g_ptr_array_add (shell->items, unity_gtk_menu_item_new (iter->data, shell, i));
22 iter = g_list_next (iter);
23 }
24+
25+ g_list_free (children);
26 }
27
28 return shell->items;

Subscribers

People subscribed via source and target branches