[gom] gom: Fix AND/OR filters memory handling
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] gom: Fix AND/OR filters memory handling
- Date: Mon, 16 Jun 2014 10:52:47 +0000 (UTC)
commit 93694570fde8e29dff132644baa2efb18ef31ff5
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jun 16 12:45:43 2014 +0200
gom: Fix AND/OR filters memory handling
The values were getting double-freed. As gom_filter_get_values() returns
a new array, no need to stuff it inside another array that we would
create ourselves, just use that original array.
https://bugzilla.gnome.org/show_bug.cgi?id=731701
gom/gom-filter.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gom/gom-filter.c b/gom/gom-filter.c
index 0e3598d..d8ccda8 100644
--- a/gom/gom-filter.c
+++ b/gom/gom-filter.c
@@ -379,13 +379,7 @@ gom_filter_get_values (GomFilter *filter)
}
case GOM_FILTER_AND:
case GOM_FILTER_OR:
- va = g_array_new(FALSE, FALSE, sizeof(GValue));
- g_array_set_clear_func(va, (GDestroyNotify) g_value_unset);
-
- tmp = gom_filter_get_values(priv->left);
- join_value_array(va, tmp);
- g_array_unref(tmp);
-
+ va = gom_filter_get_values(priv->left);
tmp = gom_filter_get_values(priv->right);
join_value_array(va, tmp);
g_array_unref(tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]