[Goodies-commits] r5102 - xfce4-sensors-plugin/trunk/panel-plugin

Fabian Nowak timystery at xfce.org
Tue Jul 15 22:53:14 CEST 2008


Author: timystery
Date: 2008-07-15 20:53:14 +0000 (Tue, 15 Jul 2008)
New Revision: 5102

Modified:
   xfce4-sensors-plugin/trunk/panel-plugin/configuration.c
Log:
and finally, check configuration to free pointers before overriding


Modified: xfce4-sensors-plugin/trunk/panel-plugin/configuration.c
===================================================================
--- xfce4-sensors-plugin/trunk/panel-plugin/configuration.c	2008-07-15 20:45:45 UTC (rev 5101)
+++ xfce4-sensors-plugin/trunk/panel-plugin/configuration.c	2008-07-15 20:53:14 UTC (rev 5102)
@@ -331,24 +331,24 @@
                         }
                         else if ((value = xfce_rc_read_entry (rc, "DeviceName", NULL))
                             && *value) {
-                            /*if (chipfeature->devicename)
-                                free (chipfeature->devicename); */
+                            if (chipfeature->devicename)
+                                free (chipfeature->devicename);
                             chipfeature->devicename = g_strdup(value);
                             /* g_free (value); */
                         }
 
                         if ((value = xfce_rc_read_entry (rc, "Name", NULL))
                                 && *value) {
-                            /*if (chipfeature->name)
-                                free (chipfeature->name); */
+                            if (chipfeature->name)
+                                free (chipfeature->name);
                             chipfeature->name = g_strdup (value);
                             /* g_free (value); */
                         }
 
                         if ((value = xfce_rc_read_entry (rc, "Color", NULL))
                                 && *value) {
-                            /* if (chipfeature->color)
-                                free (chipfeature->color); */
+                            if (chipfeature->color)
+                                free (chipfeature->color);
                             chipfeature->color = g_strdup (value);
                             /* g_free (value); */
                         }




More information about the Goodies-commits mailing list