[bijiben] controller: free notebook with g_clear_object



commit f517568ea10ae2ea1e24be49f097080edfadcc00
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Wed Aug 23 10:32:25 2017 +0530

    controller: free notebook with g_clear_object
    
    notebook is derived from GObject. So free the right way.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786666
    
    Signed-off-by: Isaque Galdino <igaldino gmail com>

 src/bjb-controller.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index a16778b..ef8e636 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -137,7 +137,7 @@ bjb_controller_finalize (GObject *object)
   g_list_free (priv->items_to_show);
 
   if (priv->notebook)
-    g_free (priv->notebook);
+    g_clear_object (&priv->notebook);
 
   G_OBJECT_CLASS (bjb_controller_parent_class)->finalize (object);
 }


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