[network-manager-applet] applet: fix leaking icon_name in foo_set_icon()



commit 628cbcbd383f9205cd380ee5608edbbbbc73c7cd
Author: Thomas Haller <thaller redhat com>
Date:   Mon Mar 7 15:36:33 2016 +0100

    applet: fix leaking icon_name in foo_set_icon()

 src/applet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 85f535c..26558d7 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2040,7 +2040,7 @@ applet_schedule_update_menu (NMApplet *applet)
 /*****************************************************************************/
 
 static void
-foo_set_icon (NMApplet *applet, guint32 layer, GdkPixbuf *pixbuf, char *icon_name)
+foo_set_icon (NMApplet *applet, guint32 layer, GdkPixbuf *pixbuf, const char *icon_name)
 {
 #ifndef ENABLE_INDICATOR
        gs_unref_object GdkPixbuf *pixbuf_free = NULL;
@@ -2054,7 +2054,7 @@ foo_set_icon (NMApplet *applet, guint32 layer, GdkPixbuf *pixbuf, char *icon_nam
         * icon and the VPN icon.
         */
        if (icon_name == NULL && layer == ICON_LAYER_LINK)
-               icon_name = g_strdup ("nm-no-connection");
+               icon_name = "nm-no-connection";
        if (icon_name != NULL && g_strcmp0 (app_indicator_get_icon (applet->app_indicator), icon_name) != 0)
                app_indicator_set_icon_full (applet->app_indicator, icon_name, applet->tip);
 #else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]