Attached few patches that fix memory leaks.
Most are not critical, and only enabled with DEBUG_LEAKS.
But one does need review, I suspect it is a runtime leak.
With these patches, sed can be compiled with gcc's address
sanitizer (ASAN) and undefined-behavior sanitizer (UBSAN),
and all tests pass under the sanitizers.
=== patches ===
sed: do not close stderr on exit
sed: free allocated memory under DEBUG_LEAKS
sed: fix memory leak (TODO: REVIEW)
gnulib: update to latest (for regex memory leaks)
maint: add address-sanitizer build target
maint: add undefined-behavior build target
===