diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-09-08 12:47:05 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-09-08 12:47:05 +0200 |
commit | 4661f6cb95c365c434b753cdf6d4c1251f321230 (patch) | |
tree | cf1225ec147958393063ad3bb6b3995abecf98a9 /builtin.c | |
parent | 187f81febdf5a52d1c646bd83a10c9f03d13947b (diff) | |
parent | c3e4d0cf3f1fd24164e0a58db23b86b56c6dc7c8 (diff) | |
download | egawk-4661f6cb95c365c434b753cdf6d4c1251f321230.tar.gz egawk-4661f6cb95c365c434b753cdf6d4c1251f321230.tar.bz2 egawk-4661f6cb95c365c434b753cdf6d4c1251f321230.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2955,13 +2955,16 @@ set_how_many: done: DEREF(s); - if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL) + if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL) { efree(buf); + buf = NULL; + } if (flags & GENSUB) { if (matches > 0) { /* return the result string */ DEREF(t); + assert(buf != NULL); return make_str_node(buf, textlen, ALREADY_MALLOCED); } |