[libgda] gdaui-basic-form: fix invalid free private



commit f681e20672d2b171d7954a416839ec2134ba44d8
Author: Daniel Espinosa <esodan gmail com>
Date:   Sat Sep 8 19:15:47 2018 -0500

    gdaui-basic-form: fix invalid free private

 libgda-ui/gdaui-basic-form.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/libgda-ui/gdaui-basic-form.c b/libgda-ui/gdaui-basic-form.c
index ae106c2e7..dc56ca489 100644
--- a/libgda-ui/gdaui-basic-form.c
+++ b/libgda-ui/gdaui-basic-form.c
@@ -552,23 +552,18 @@ gdaui_basic_form_dispose (GObject *object)
        form = GDAUI_BASIC_FORM (object);
        GdauiBasicFormPrivate *priv = gdaui_basic_form_get_instance_private (form);
 
-       if (priv) {
-               /* paramlist */
-               if (priv->set)
-                       get_rid_of_set (priv->set, form);
-
-               destroy_entries (form);
+       /* paramlist */
+       if (priv->set)
+               get_rid_of_set (priv->set, form);
 
-               if (priv->size_groups) {
-                       g_slist_foreach (priv->size_groups, (GFunc) size_group_free, NULL);
-                       g_slist_free (priv->size_groups);
-               }
+       destroy_entries (form);
 
-               /* the private area itself */
-               g_free (priv);
-               priv = NULL;
+       if (priv->size_groups) {
+               g_slist_foreach (priv->size_groups, (GFunc) size_group_free, NULL);
+               g_slist_free (priv->size_groups);
        }
 
+
        /* for the parent class */
        G_OBJECT_CLASS (gdaui_basic_form_parent_class)->dispose (object);
 }


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