[template-glib] eval: clear gvalues when finished with them



commit 1e38f80ba0c6d4bbf1887e7b0dc0b3a92872a0d8
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 23 16:06:18 2017 -0700

    eval: clear gvalues when finished with them

 src/tmpl-expr-eval.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/tmpl-expr-eval.c b/src/tmpl-expr-eval.c
index 78d9918..d456a65 100644
--- a/src/tmpl-expr-eval.c
+++ b/src/tmpl-expr-eval.c
@@ -860,6 +860,7 @@ tmpl_expr_gi_call_eval (TmplExprGiCall  *node,
   n_args = g_callable_info_get_n_args ((GICallableInfo *)function);
 
   values = g_array_new (FALSE, TRUE, sizeof (GValue));
+  g_array_set_clear_func (values, (GDestroyNotify)g_value_unset);
   g_array_set_size (values, n_args);
 
   in_args = g_array_new (FALSE, TRUE, sizeof (GIArgument));


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