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 . */ #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");