[template-glib] expr-eval: plug two leaks found with valgrind
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] expr-eval: plug two leaks found with valgrind
- Date: Fri, 6 May 2022 21:59:55 +0000 (UTC)
commit f5488d890ce45a7bb714b4b42a4dc1a5df02d1b1
Author: Christian Hergert <chergert redhat com>
Date: Fri May 6 14:59:51 2022 -0700
expr-eval: plug two leaks found with valgrind
src/tmpl-expr-eval.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/tmpl-expr-eval.c b/src/tmpl-expr-eval.c
index 39af2a1..3a60305 100644
--- a/src/tmpl-expr-eval.c
+++ b/src/tmpl-expr-eval.c
@@ -1222,6 +1222,8 @@ cleanup:
TMPL_CLEAR_VALUE (&left);
TMPL_CLEAR_VALUE (&right);
+ g_clear_pointer (&function, g_base_info_unref);
+
return ret;
}
@@ -1510,6 +1512,8 @@ tmpl_expr_func_eval (TmplExprFunc *node,
g_value_set_boxed (return_value, node);
}
+ g_clear_pointer (&args, g_ptr_array_unref);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]