1 Commits
Author SHA1 Message Date
Weixie Cui 0e2491480a sed: avoid a one-time, one-byte leak
* sed/execute.c (line_reset): Also free buf->text when buf->alloc is zero.
* testsuite/bug80573.sh: New file.
* testsuite/local.mk (T): Add it to the list.
Demonstrate via this:
echo | valgrind --leak-check=full sed/sed -e x -e 's/.*/echo hi/e' 2>&1 | grep -A5 'definitely lost'
Reported in https://bugs.gnu.org/80573
2026-03-21 18:58:36 -07:00