[libgda] GdaDataModel: Fix memory leak at import from model
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaDataModel: Fix memory leak at import from model
- Date: Mon, 22 Apr 2019 21:15:47 +0000 (UTC)
commit 23c53b4c321d39f3a17e54b2a2b722cc175478ab
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Apr 22 14:25:48 2019 -0500
GdaDataModel: Fix memory leak at import from model
libgda/gda-data-model.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/libgda/gda-data-model.c b/libgda/gda-data-model.c
index c454be53b..7e42ae05f 100644
--- a/libgda/gda-data-model.c
+++ b/libgda/gda-data-model.c
@@ -2134,17 +2134,8 @@ gda_data_model_import_from_model (GdaDataModel *to, GdaDataModel *from,
}
/* free memory */
- {
- GList *vlist;
-
- vlist = append_values;
- while (vlist) {
- if (vlist->data)
- gda_value_free ((GValue *) vlist->data);
- vlist = g_list_next (vlist);
- }
- g_free (append_types);
- }
+ g_list_free_full (append_values, (GDestroyNotify) gda_value_free);
+ g_free (append_types);
if (retval && (to_row >= 0)) {
/* remove extra rows */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]