[recipes] edit page: Plug a memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] edit page: Plug a memory leak
- Date: Sun, 5 Mar 2017 03:22:13 +0000 (UTC)
commit 0e9e382b08a0b3f95309690c34487d5532e52141
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 4 22:11:44 2017 -0500
edit page: Plug a memory leak
populate_ingredients was leaking some strings.
src/gr-edit-page.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index eaed05e..f7dcf60 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -1770,9 +1770,7 @@ populate_ingredients (GrEditPage *page,
{
g_autoptr(GrIngredientsList) ingredients = NULL;
g_autofree char **segs = NULL;
- g_auto(GStrv) ings = NULL;
int i, j;
- GtkWidget *list;
GtkWidget *button;
container_remove_all (GTK_CONTAINER (page->ingredients_box));
@@ -1783,6 +1781,9 @@ populate_ingredients (GrEditPage *page,
ingredients = gr_ingredients_list_new (text);
segs = gr_ingredients_list_get_segments (ingredients);
for (j = 0; segs[j]; j++) {
+ GtkWidget *list;
+ g_auto(GStrv) ings = NULL;
+
list = add_ingredients_segment (page, segs[j]);
ings = gr_ingredients_list_get_ingredients (ingredients, segs[j]);
for (i = 0; ings[i]; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]