aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-24 22:15:31 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-03-24 22:15:31 +0200
commit080694ae82635e76992158591b39a06af7363da0 (patch)
tree454a9361afa2904702baac9b3777fe76e721d7ca /node.c
parent75459887958f5246bc5126261ec92c8f4d366a47 (diff)
downloadegawk-080694ae82635e76992158591b39a06af7363da0.tar.gz
egawk-080694ae82635e76992158591b39a06af7363da0.tar.bz2
egawk-080694ae82635e76992158591b39a06af7363da0.zip
Further progress on indirect calls of builtins.
Diffstat (limited to 'node.c')
-rw-r--r--node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/node.c b/node.c
index 9fd4c7b9..179d272e 100644
--- a/node.c
+++ b/node.c
@@ -431,6 +431,13 @@ r_unref(NODE *tmp)
#ifdef GAWKDEBUG
if (tmp == NULL)
return;
+ if (tmp->type == Node_regex) {
+ if (tmp->re_reg != NULL)
+ refree(tmp->re_reg);
+ if (tmp->re_text != NULL)
+ unref(tmp->re_text);
+ goto free_the_node;
+ }
if ((tmp->flags & MALLOC) != 0) {
if (tmp->valref > 1) {
tmp->valref--;
@@ -447,6 +454,7 @@ r_unref(NODE *tmp)
mpfr_unset(tmp);
free_wstr(tmp);
+free_the_node:
freenode(tmp);
}