From e5266f9ebae9e0a30a018c1591a8110714a1dcd5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 14 Feb 2017 15:56:34 -0700 Subject: [PATCH] Only inhibit ASAN leak detector for tests that result in a parse error. The parser cannot currently clean up completely on error. --- plugins/sudoers/Makefile.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 48e03f7a3..517e8b4bd 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -390,7 +390,12 @@ check: $(TEST_PROGS) visudo testsudoers out="regress/sudoers/$${base}.out"; \ toke="regress/sudoers/$${base}.toke"; \ json="regress/sudoers/$${base}.json"; \ - ASAN_OPTIONS=detect_leaks=0 \ + if test -s $$json.ok; then \ + ASAN_OPTIONS=; \ + else \ + ASAN_OPTIONS=detect_leaks=0; \ + fi; \ + ASAN_OPTIONS=$$ASAN_OPTIONS \ ./testsudoers -dt <$$t >$$out 2>$$toke || true; \ if cmp $$out $(srcdir)/$$out.ok >/dev/null; then \ passed=`expr $$passed + 1`; \ -- 2.40.0