From 09b84d1b22e007d0d0a15ba14fbd1b9a7c553166 Mon Sep 17 00:00:00 2001 From: btharper Date: Mon, 18 Mar 2019 23:49:59 -0400 Subject: [PATCH] Fix leak of locale string --- Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst | 1 + Python/preconfig.c | 1 + 2 files changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst diff --git a/Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst b/Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst new file mode 100644 index 000000000000000..d30f5d586b7c149 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst @@ -0,0 +1 @@ +Fix leaks that led to build failure when configured with address sanitizer. diff --git a/Python/preconfig.c b/Python/preconfig.c index 1efc7ee5c56ed1a..b03436181c860bd 100644 --- a/Python/preconfig.c +++ b/Python/preconfig.c @@ -514,6 +514,7 @@ _PyPreConfig_Read(_PyPreConfig *config) err = preconfig_read(config, NULL); setlocale(LC_CTYPE, old_loc); + PyMem_RawFree(old_loc); return err; }