[recipes] edit page: Plug another small memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] edit page: Plug another small memory leak
- Date: Sun, 5 Mar 2017 03:22:18 +0000 (UTC)
commit 18076f9383a1c29caa97384791c2a1fde4001fc3
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 4 22:20:55 2017 -0500
edit page: Plug another small memory leak
We were leaking the author name in some places.
src/gr-edit-page.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index f7dcf60..a07aa25 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -1260,7 +1260,6 @@ edit_chef (GrEditPage *page)
{
GrChefDialog *dialog;
GtkWidget *win;
- const char *author;
GrRecipeStore *store;
g_autoptr(GrChef) chef = NULL;
@@ -1268,8 +1267,7 @@ edit_chef (GrEditPage *page)
store = gr_app_get_recipe_store (GR_APP (g_application_get_default ()));
- author = page->author;
- chef = gr_recipe_store_get_chef (store, author ? author : "");
+ chef = gr_recipe_store_get_chef (store, page->author ? page->author : "");
dialog = gr_chef_dialog_new (chef, TRUE);
g_signal_connect (dialog, "done", G_CALLBACK (chef_done), page);
@@ -1991,6 +1989,7 @@ gr_edit_page_edit (GrEditPage *page,
g_object_get (recipe, "images", &images, NULL);
+ g_free (page->author);
page->author = g_strdup (author);
chef = gr_recipe_store_get_chef (store, author ? author : "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]