From: Todd C. Miller Date: Wed, 4 May 2016 19:01:57 +0000 (-0600) Subject: Define NO_LEAKS when sudo is built with Coverity. X-Git-Tag: SUDO_1_8_17^2~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b20b411e71114d8cb97f406b68a182639e3cf587;p=sudo Define NO_LEAKS when sudo is built with Coverity. --- diff --git a/config.h.in b/config.h.in index b3311e922..f9d63a5d5 100644 --- a/config.h.in +++ b/config.h.in @@ -1227,4 +1227,9 @@ # undef __STDC_WANT_LIB_EXT1__ #endif +/* Prevent static analyzers from genering bogus memory leak warnings. */ +#if defined(__COVERITY__) && !defined(NO_LEAKS) +# define NO_LEAKS +#endif + #endif /* SUDO_CONFIG_H */ diff --git a/configure.ac b/configure.ac index 3117cf993..187cff598 100644 --- a/configure.ac +++ b/configure.ac @@ -4417,4 +4417,9 @@ AH_BOTTOM([/* BSD compatibility on some SVR4 systems. */ # undef __STDC_WANT_LIB_EXT1__ #endif +/* Prevent static analyzers from genering bogus memory leak warnings. */ +#if defined(__COVERITY__) && !defined(NO_LEAKS) +# define NO_LEAKS +#endif + #endif /* SUDO_CONFIG_H */])