From: Paul Eggert <eggert@cs.ucla.edu> Date: Sun, 21 Apr 2019 06:10:37 +0000 (-0700) Subject: Port make-fingerprint to LeakSanitizer X-Git-Tag: emacs-27.0.90~3165 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f90aa7eec8909d6e4501dcd551665981b6b09af;p=emacs.git Port make-fingerprint to LeakSanitizer * lib-src/make-fingerprint.c (buf): Now static, to pacify LeakSanitizer. --- diff --git a/lib-src/make-fingerprint.c b/lib-src/make-fingerprint.c index 38a33576148..79bd007a5f9 100644 --- a/lib-src/make-fingerprint.c +++ b/lib-src/make-fingerprint.c @@ -57,6 +57,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif #endif /* WINDOWSNT */ +/* Static (instead of being local to 'main') to pacify LeakSanitizer. */ +static char *buf; + int main (int argc, char **argv) { @@ -111,7 +114,7 @@ main (int argc, char **argv) return EXIT_FAILURE; } - char *buf = malloc (st.st_size + 1); + buf = malloc (st.st_size + 1); if (!buf) { perror ("malloc");