[gnome-flashback] Properly finalize app->priv->automount object



commit ce1b1ad6a2a1e104f124168cbd38172a8a370ff5
Author: Dmitry Shachnev <mitya57 gmail com>
Date:   Fri Dec 5 09:10:01 2014 +0300

    Properly finalize app->priv->automount object

 gnome-flashback/flashback-application.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 1838423..457d1dd 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -64,10 +64,7 @@ flashback_application_settings_changed (GSettings   *settings,
                                app->priv->automount = gsd_automount_manager_new ();
                        }
                } else {
-                       if (app->priv->automount) {
-                               g_object_unref (app->priv->automount);
-                               app->priv->automount = NULL;
-                       }
+                       g_clear_object (&app->priv->automount);
                }
        }
 
@@ -142,6 +139,7 @@ flashback_application_finalize (GObject *object)
                app->priv->bus_name = 0;
        }
 
+       g_clear_object (&app->priv->automount);
        g_clear_object (&app->priv->background);
        g_clear_object (&app->priv->config);
        g_clear_object (&app->priv->dialog);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]