[libgda] GdaMetaStore: Fix memory leak at internal table's key/values



commit 9365dbbf769ddec144107a622963c7c72f44f79b
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Apr 24 13:38:04 2019 -0500

    GdaMetaStore: Fix memory leak at internal table's key/values

 libgda/gda-meta-store.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 9e04700b7..82f43db01 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -851,7 +851,12 @@ gda_meta_store_init (GdaMetaStore *store)
   /* Class private data */
        priv->prep_stmts = g_new0 (GdaStatement *, STMT_LAST);
        priv->parser = gda_sql_parser_new ();
-       priv->provider_specifics = g_hash_table_new (ProviderSpecific_hash, ProviderSpecific_equal);
+       priv->provider_specifics = g_hash_table_new_full (ProviderSpecific_hash,
+                                                    ProviderSpecific_equal,
+                                                    (GDestroyNotify) g_free,
+                                                    (GDestroyNotify) g_free);
+
+       /* priv->provider_specifics = g_hash_table_new (ProviderSpecific_hash, ProviderSpecific_equal); */
        priv->db_objects_hash = g_hash_table_new (g_str_hash, g_str_equal);
        create_db_objects (priv, NULL);
   priv->table_cond_info_hash = g_hash_table_new (g_str_hash, g_str_equal);


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