aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indicator-power.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 9287f0b..dcd5db0 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -352,7 +352,7 @@ set_accessible_desc (IndicatorPower *self,
{
IndicatorPowerPrivate *priv = self->priv;
- if (desc == NULL || strlen(desc) == 0)
+ if (desc == NULL || desc[0] == '\0')
return;
g_free (priv->accessible_desc);
@@ -905,6 +905,10 @@ indicator_power_dispose (GObject *object)
static void
indicator_power_finalize (GObject *object)
{
+ IndicatorPowerPrivate *priv = INDICATOR_POWER(object)->priv;
+
+ g_free (priv->accessible_desc);
+
G_OBJECT_CLASS (indicator_power_parent_class)->finalize (object);
}