patch 8.2.0489: Vim9: memory leaks
Problem: Vim9: memory leaks.
Solution: Free memory in the right place. Add hints for using asan.
diff --git a/src/Makefile b/src/Makefile
index 690ac3f..221b4f0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -691,9 +691,12 @@
# Uncomment one of the next two lines to compile Vim with the
-# address sanitizer or with the undefined sanitizer. Works with gcc and
+# address sanitizer (asan) or with the undefined sanitizer. Works with gcc and
# clang. May make Vim twice as slow. Errors reported on stderr.
# More at: https://code.google.com/p/address-sanitizer/
+# Useful environment variables:
+# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
+# $ export LSAN_OPTIONS="suppressions=$cwd/testdir/lsan-suppress.txt"
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
SANITIZER_LIBS = $(SANITIZER_CFLAGS)