From 28436897d3289b4fe1b7e84e63c9cffecfcb17f6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 26 Nov 2010 12:37:45 +0200 Subject: Fix memory leaks - patch from John. --- eval.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index fea990af..eb5e40e5 100644 --- a/eval.c +++ b/eval.c @@ -1439,7 +1439,7 @@ unwind_stack(STACK_ITEM *sp_bottom) break; default: - if (get_context()->level == 0) + if (in_main_context()) fatal(_("unwind_stack: unexpected type `%s'"), nodetype2str(r->type)); /* else @@ -1501,11 +1501,14 @@ static void op_assign(OPCODE op) { NODE **lhs; - NODE *r; - AWKNUM x, x1, x2; + NODE *r = NULL; + AWKNUM x1, x2; #ifdef _CRAY long lx; #endif +#ifndef HAVE_FMOD + AWKNUM x; +#endif lhs = POP_ADDRESS(); x1 = force_number(*lhs); -- cgit v1.2.3