onetrueawk / awk

One true awk
Other
1.98k stars 159 forks source link

Stop node leaks subsequent to strnode in gensub #160

Closed mpinjr closed 2 years ago

mpinjr commented 2 years ago

In every instance, after strnode has extracted the string, the node is leaked.

valgrind --leak-check=full ./a.out 'BEGIN {$0="a"; gensub("a", "z", "g")}' valgrind --leak-check=full ./a.out 'BEGIN {gensub("a", "z", "g", "a")}'