aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-02-13 19:56:21 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-02-13 19:56:21 +0200
commitc160d41490f752f55312f2de91cdd94cc9270141 (patch)
tree16d97a0a90b9465f76da3404d10e347d6f91faac /array.c
parent050e7204af5086a851c22beb0829e9b9a163e8e1 (diff)
downloadegawk-c160d41490f752f55312f2de91cdd94cc9270141.tar.gz
egawk-c160d41490f752f55312f2de91cdd94cc9270141.tar.bz2
egawk-c160d41490f752f55312f2de91cdd94cc9270141.zip
Profile fix and test for it.
Diffstat (limited to 'array.c')
-rw-r--r--array.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/array.c b/array.c
index 3dd9a99d..eb5ed941 100644
--- a/array.c
+++ b/array.c
@@ -698,7 +698,10 @@ do_delete(NODE *symbol, int nsubs)
if (r->var_array != NULL || nsubs > 1)
return;
/* else
- cleared a sub_array, free index */
+ cleared a sub-array, free the array node
+ and the bucket in parent array */
+ efree(r->vname);
+ freenode(r);
} else if (--nsubs > 0) {
/* e.g.: a[1] = 1; delete a[1][1] */
free_subs(nsubs);