This is an automated email from the git hooks/post-receive script.

andre pushed a 
commit to branch 
master
in repository panel-plugins/xfce4-battery-plugin.

commit b32c015ed36c0f6e9e053351482303a15615847a
Author: Andre Miranda <[email protected]>
Date:   Mon Dec 31 18:15:52 2018 -0300

    Fix possible memory leak
---
 panel-plugin/battery.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index 630e157..7ee4cb1 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -294,9 +294,11 @@ update_apm_status(t_battmon *battmon)
           new_state = BM_FULL;
         }
         if (acline && new_state != BM_MISSING) {
+            gchar *tmp = g_strdup(icon_name);
+            g_free(icon_name);
             new_state++;
-            gchar * tmp = g_strdup(icon_name); g_free(icon_name);
             icon_name = g_strconcat(tmp, "-charging", NULL);
+            g_free(tmp);
         }
         DBG("old_state=%d, new_state=%d, icon_name=%s", old_state, new_state, 
icon_name);
         if (old_state != new_state)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to