aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-01-19 21:08:52 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-01-19 21:08:52 +0200
commit195f6c171ee765ef7c0bcba5b98ffea15b439882 (patch)
tree259100f8309504e6b3b8b254f727f413f3d13e26 /awkgram.c
parent75793ea4b9a82c7aaae712d42c8f4a6370c54944 (diff)
parent5a619e1986724cf8e27b637509925a8da36837e8 (diff)
downloadegawk-195f6c171ee765ef7c0bcba5b98ffea15b439882.tar.gz
egawk-195f6c171ee765ef7c0bcba5b98ffea15b439882.tar.bz2
egawk-195f6c171ee765ef7c0bcba5b98ffea15b439882.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/awkgram.c b/awkgram.c
index 2f0f7283..911c661b 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -7447,8 +7447,14 @@ make_regnode(int type, NODE *exp)
n->re_cnt = 1;
if (type == Node_regex) {
- n->re_reg = make_regexp(exp->stptr, exp->stlen, false, true, false);
- if (n->re_reg == NULL) {
+ n->re_reg[0] = make_regexp(exp->stptr, exp->stlen, false, true, false);
+ if (n->re_reg[0] == NULL) {
+ freenode(n);
+ return NULL;
+ }
+ n->re_reg[1] = make_regexp(exp->stptr, exp->stlen, true, true, false);
+ if (n->re_reg[1] == NULL) {
+ refree(n->re_reg[0]);
freenode(n);
return NULL;
}