[gnome-initial-setup/shell/4765: 320/362] account: plug some memory leaks
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 320/362] account: plug some memory leaks
- Date: Thu, 19 Mar 2015 01:47:59 +0000 (UTC)
commit bd1d8159fb19142e04c56d9de53aeb9c63dbda97
Author: Cosimo Cecchi <cosimo endlesm com>
Date: Tue Dec 30 17:45:45 2014 +0800
account: plug some memory leaks
.../pages/account/gis-account-page.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c
b/gnome-initial-setup/pages/account/gis-account-page.c
index 9b66dd5..72c7ca4 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -282,7 +282,7 @@ username_changed (GtkComboBoxText *combo,
GisAccountPage *page)
{
GisAccountPagePrivate *priv = gis_account_page_get_instance_private (page);
- const gchar *username;
+ gchar *username;
gchar *tip;
GtkWidget *entry;
@@ -305,6 +305,8 @@ username_changed (GtkComboBoxText *combo,
}
update_account_page_status (page);
+
+ g_free (username);
}
static gboolean
@@ -351,7 +353,7 @@ update_password_entries (GisAccountPage *page)
{
GisAccountPagePrivate *priv = gis_account_page_get_instance_private (page);
const gchar *password;
- const gchar *username;
+ gchar *username;
GtkWidget *password_entry;
GtkWidget *confirm_entry;
GtkWidget *username_combo;
@@ -379,6 +381,8 @@ update_password_entries (GisAccountPage *page)
gtk_widget_set_sensitive (confirm_entry, TRUE);
refresh_reason_timeout (page);
+
+ g_free (username);
}
static void
@@ -468,7 +472,7 @@ static void
local_create_user (GisAccountPage *page)
{
GisAccountPagePrivate *priv = gis_account_page_get_instance_private (page);
- const gchar *username;
+ gchar *username;
const gchar *password;
const gchar *old_password;
const gchar *fullname;
@@ -486,6 +490,8 @@ local_create_user (GisAccountPage *page)
if (error != NULL) {
g_warning ("Failed to create user: %s", error->message);
g_error_free (error);
+ g_free (username);
+
return;
}
@@ -512,6 +518,8 @@ local_create_user (GisAccountPage *page)
password);
gis_update_login_keyring_password (old_password, password);
+
+ g_free (username);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]