aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-11-26 12:37:45 +0200
committerArnold D. Robbins <arnold@skeeve.com>2010-11-26 12:37:45 +0200
commit28436897d3289b4fe1b7e84e63c9cffecfcb17f6 (patch)
tree15b68beb5212a1791cb0eb5af633247e54e779e4 /eval.c
parent286748e1a8500f647c3bccfb467b02bf3a37f398 (diff)
downloadegawk-28436897d3289b4fe1b7e84e63c9cffecfcb17f6.tar.gz
egawk-28436897d3289b4fe1b7e84e63c9cffecfcb17f6.tar.bz2
egawk-28436897d3289b4fe1b7e84e63c9cffecfcb17f6.zip
Fix memory leaks - patch from John.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 6 insertions, 3 deletions
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);