aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-29 17:50:40 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-29 17:50:40 -0600
commit54a3d1daeb240ce9b014a549801375e5a2c860f2 (patch)
tree7c9ddc3bca4d0c9bbffae07de0cd7a5d752e8e0b /libindicator
parent69f15f71084d413e8063e577689be9ca8a3aedc6 (diff)
parent9e2278a994df1d5a237e4f21bc191965323653c9 (diff)
downloadlibayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.tar.gz
libayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.tar.bz2
libayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.zip
lp:~charlesk/libindicator/fix-939061
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-object.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 17a6d1d..ca821af 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -464,21 +464,16 @@ indicator_object_new_from_file (const gchar * file)
goto unrefandout;
}
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(object);
/* Now we can track the module */
- priv->module = module;
+ INDICATOR_OBJECT_GET_PRIVATE(object)->module = module;
return INDICATOR_OBJECT(object);
/* Error, let's drop the object and return NULL. Sad when
this happens. */
unrefandout:
- if (object != NULL) {
- g_object_unref(object);
- }
- if (module != NULL) {
- g_object_unref(module);
- }
+ g_clear_object (&object);
+ g_clear_object (&module);
g_warning("Error building IndicatorObject from file: %s", file);
return NULL;
}