From 89e0c732b1c45f6498ed0f39add77c2a52afddce Mon Sep 17 00:00:00 2001 From: Samuel Cabrero Date: Wed, 1 Jun 2022 11:56:19 +0200 Subject: [PATCH] replace: Check for -Wuse-after-free BUG: https://bugzilla.samba.org/show_bug.cgi?id=15095 Signed-off-by: Samuel Cabrero Reviewed-by: Andrew Bartlett --- lib/replace/wscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/replace/wscript b/lib/replace/wscript index 827d74f19cb..2808db2e518 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -128,6 +128,9 @@ def configure(conf): if conf.CHECK_CFLAGS('-Wno-strict-overflow'): conf.define('HAVE_WNO_STRICT_OVERFLOW', '1') + if conf.CHECK_CFLAGS('-Wuse-after-free=1'): + conf.define('HAVE_WUSE_AFTER_FREE_1', '1') + # Check for process set name support conf.CHECK_CODE(''' #include