[libgda] GdaDataModel: fix memory leak when import copy params
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaDataModel: fix memory leak when import copy params
- Date: Mon, 22 Apr 2019 21:15:57 +0000 (UTC)
commit 2300ef2a78a9efc109f6407afd0c22b24f5ae14d
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Apr 22 14:42:30 2019 -0500
GdaDataModel: fix memory leak when import copy params
libgda/gda-data-model.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/libgda/gda-data-model.c b/libgda/gda-data-model.c
index 7e42ae05f..4836c9090 100644
--- a/libgda/gda-data-model.c
+++ b/libgda/gda-data-model.c
@@ -1991,6 +1991,7 @@ gda_data_model_import_from_model (GdaDataModel *to, GdaDataModel *from,
(gda_holder_get_g_type (param) != G_TYPE_INVALID) &&
!g_value_type_transformable (gda_holder_get_g_type (param),
gda_column_get_g_type (column))) {
+ g_slist_free (copy_params);
g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA_MODEL_VALUE_TYPE_ERROR,
_("Destination column %d has a gda type (%s) incompatible with "
"source column %d type (%s)"), i,
@@ -2134,6 +2135,9 @@ gda_data_model_import_from_model (GdaDataModel *to, GdaDataModel *from,
}
/* free memory */
+ if (copy_params) {
+ g_slist_free (copy_params);
+ }
g_list_free_full (append_values, (GDestroyNotify) gda_value_free);
g_free (append_types);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]