aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-16 18:12:56 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-03-16 18:12:56 -0500
commit537804ecacb2732a6e86a4234f7173cd54f3b095 (patch)
tree6f453b3b8e8f746894903d27506dc2e44e6aab6f
parentf6a6e8cfee89492f4f94f9382d02831b140fffbc (diff)
downloadayatana-indicator-session-537804ecacb2732a6e86a4234f7173cd54f3b095.tar.gz
ayatana-indicator-session-537804ecacb2732a6e86a4234f7173cd54f3b095.tar.bz2
ayatana-indicator-session-537804ecacb2732a6e86a4234f7173cd54f3b095.zip
plug two more memory leaks. g_variant_get("s") makes a newly-allocated duplicated string, g_variant_get("&s") returns the internal const string.
-rw-r--r--src/indicator-session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 5d894e8..0051af1 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -428,7 +428,7 @@ user_real_name_get_cb (GObject * obj, GAsyncResult * res, gpointer user_data)
}
const gchar* username = NULL;
- g_variant_get (result, "(s)", &username);
+ g_variant_get (result, "(&s)", &username);
indicator_session_update_users_label (self, username);
return;
}
@@ -481,7 +481,7 @@ receive_signal (GDBusProxy * proxy,
if (g_strcmp0(signal_name, "UserRealNameUpdated") == 0) {
const gchar* username = NULL;
- g_variant_get (parameters, "(s)", &username);
+ g_variant_get (parameters, "(&s)", &username);
indicator_session_update_users_label (self, username);
}
else if (g_strcmp0(signal_name, "UserMenuIsVisible") == 0) {