[aravis] evaluator: fix token memleaks.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] evaluator: fix token memleaks.
- Date: Mon, 28 Jun 2010 13:20:15 +0000 (UTC)
commit c122d54932259de0a0b2abc54c083f8ed3fbe80a
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Mon Jun 28 13:26:02 2010 +0200
evaluator: fix token memleaks.
It happened on errors or on right parenthesis.
src/arvevaluator.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/arvevaluator.c b/src/arvevaluator.c
index 5ac4e59..8a443e1 100644
--- a/src/arvevaluator.c
+++ b/src/arvevaluator.c
@@ -881,7 +881,7 @@ parse_expression (char *expression, GSList **rpn_stack)
status = ARV_EVALUATOR_STATUS_PARENTHESES_MISMATCH;
goto CLEANUP;
}
-
+ arv_evaluator_token_free (token);
arv_evaluator_token_free (operator_stack->data);
operator_stack = g_slist_delete_link (operator_stack, operator_stack);
} else {
@@ -910,6 +910,8 @@ parse_expression (char *expression, GSList **rpn_stack)
CLEANUP:
+ if (token != NULL)
+ arv_evaluator_token_free (token);
for (iter = token_stack; iter != NULL; iter = iter->next)
arv_evaluator_token_free (iter->data);
g_slist_free (token_stack);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]