aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-power.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-01 18:50:19 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-01 18:50:19 -0600
commitc63e1db05b4063b6d7b1d78e7e52e5d8176cfd67 (patch)
treeb236aa5755b1f2dbd9dd06eaa7e41f7e5c1330d2 /src/indicator-power.c
parentaa089d4d002ae4c93a1d1d3757f408ba2cd7c28c (diff)
downloadayatana-indicator-power-c63e1db05b4063b6d7b1d78e7e52e5d8176cfd67.tar.gz
ayatana-indicator-power-c63e1db05b4063b6d7b1d78e7e52e5d8176cfd67.tar.bz2
ayatana-indicator-power-c63e1db05b4063b6d7b1d78e7e52e5d8176cfd67.zip
don't leak priv->accessible_desc
Diffstat (limited to 'src/indicator-power.c')
-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);
}