summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Build/2019-03-18-23-49-15.bpo-36356.WNrwYI.rst1
-rw-r--r--Python/preconfig.c1
2 files changed, 2 insertions, 0 deletions
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 0000000..d30f5d5
--- /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 1efc7ee..b034361 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;
}