[gnome-initial-setup] goa: fix a memory leak
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] goa: fix a memory leak
- Date: Thu, 26 Oct 2017 07:56:08 +0000 (UTC)
commit db63ec68a61578c62b02c3a34b2a334b626b8b73
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Thu Sep 7 13:24:39 2017 -0700
goa: fix a memory leak
goa_provider_get_provider_name() returns a new string.
https://bugzilla.gnome.org/show_bug.cgi?id=787510
gnome-initial-setup/pages/goa/gis-goa-page.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.c b/gnome-initial-setup/pages/goa/gis-goa-page.c
index c518dfa..6101981 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c
@@ -121,7 +121,7 @@ add_provider_to_list (GisGoaPage *page, const char *provider_type)
GtkWidget *checkmark;
GtkWidget *account_label;
GIcon *icon;
- gchar *markup;
+ gchar *markup, *provider_name;
GoaProvider *provider;
ProviderWidget *provider_widget;
@@ -137,10 +137,12 @@ add_provider_to_list (GisGoaPage *page, const char *provider_type)
icon = goa_provider_get_provider_icon (provider, NULL);
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
- markup = g_strdup_printf ("<b>%s</b>", goa_provider_get_provider_name (provider, NULL));
+ provider_name = goa_provider_get_provider_name (provider, NULL);
+ markup = g_strdup_printf ("<b>%s</b>", provider_name);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
+ g_free (provider_name);
checkmark = gtk_image_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]