diff options
-rw-r--r-- | ChangeLog | 24 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | src/device-menu-mgr.c | 7 | ||||
-rw-r--r-- | src/indicator-session.c | 16 |
6 files changed, 42 insertions, 16 deletions
@@ -1,5 +1,29 @@ # Generated by Makefile. Do not edit. +2012-03-21 Charles Kerr <charles.kerr@canonical.com> + + 0.3.95 + +2012-03-19 Charles Kerr <charles.kerr@canonical.com> + + Merge lp:~charlesk/indicator-session/lp-957342 to fix a pair of indicator-session memory leaks. + +2012-03-16 Charles Kerr <charles.kerr@canonical.com> + + fix memory leak updating the username label -- gtk_label_set_text() takes a const char*, we don't need to g_strdup() the string before passing it in + +2012-03-16 Charles Kerr <charles.kerr@canonical.com> + + plug two more memory leaks. g_variant_get("s") makes a newly-allocated duplicated string, g_variant_get("&s") returns the internal const string. + +2012-03-16 Charles Kerr <charles.kerr@canonical.com> + + plug two leaked strings in keybinding_changed() + +2012-03-16 Charles Kerr <charles.kerr@canonical.com> + + to pull a const string from g_variant_get(), use a format string "&s", not "s" + 2012-03-14 Charles Kerr <charles.kerr@canonical.com> 0.3.94 @@ -2774,7 +2774,7 @@ fi # Define the identity of the package. PACKAGE=indicator-session - VERSION=0.3.94 + VERSION=0.3.95 cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 0daf69b..1230e8b 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.3.94) +AM_INIT_AUTOMAKE(indicator-session, 0.3.95) AM_MAINTAINER_MODE diff --git a/debian/changelog b/debian/changelog index d521620..a96b03c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +indicator-session (0.3.95-0ubuntu1~ppa1) precise; urgency=low + + * New upstream release. + * Fix small memory leaks (lp: #957342) + + -- Charles Kerr <charles.kerr@canonical.com> Wed, 21 Mar 2012 12:28:43 -0500 + indicator-session (0.3.94-0ubuntu1) precise; urgency=low * New upstream release. diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index cfdb55d..d081937 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -166,11 +166,12 @@ keybinding_changed (GSettings *settings, } if (g_strcmp0 (key, KEY_LOCK_SCREEN) == 0) { - g_debug("Keybinding changed to: %s", g_settings_get_string(settings, key)); + gchar * val = g_settings_get_string(settings, key); + g_debug("Keybinding changed to: %s", val); if (lock_menuitem != NULL) { - dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, - g_settings_get_string(settings, key)); + dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, val); } + g_free (val); } return; } diff --git a/src/indicator-session.c b/src/indicator-session.c index 5d894e8..c6f4d9c 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) { @@ -713,14 +713,8 @@ indicator_session_update_users_label (IndicatorSession* self, } GSettings* settings = g_settings_new ("com.canonical.indicator.session"); - gboolean use_name = g_settings_get_boolean (settings, - "show-real-name-on-panel"); + const gboolean use_name = g_settings_get_boolean (settings, "show-real-name-on-panel"); + gtk_label_set_text (self->users.label, name); + gtk_widget_set_visible (GTK_WIDGET(self->users.label), use_name); g_object_unref (settings); - gtk_label_set_text (self->users.label, g_strdup(name)); - if (use_name){ - gtk_widget_show(GTK_WIDGET(self->users.label)); - } - else{ - gtk_widget_hide(GTK_WIDGET(self->users.label)); - } } |