diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-02-29 17:50:40 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-02-29 17:50:40 -0600 |
commit | 54a3d1daeb240ce9b014a549801375e5a2c860f2 (patch) | |
tree | 7c9ddc3bca4d0c9bbffae07de0cd7a5d752e8e0b | |
parent | 69f15f71084d413e8063e577689be9ca8a3aedc6 (diff) | |
parent | 9e2278a994df1d5a237e4f21bc191965323653c9 (diff) | |
download | libayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.tar.gz libayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.tar.bz2 libayatana-indicator-54a3d1daeb240ce9b014a549801375e5a2c860f2.zip |
lp:~charlesk/libindicator/fix-939061
-rw-r--r-- | libindicator/indicator-object.c | 11 |
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; } |