summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorbtharper <btharper1221@gmail.com>2019-03-19 10:50:25 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-03-19 10:50:25 (GMT)
commite130a07eb20c4b655d182d5d10d778c7584efe55 (patch)
treedcb4ab4bc3258658b0ce9e7aa3cf46c7969a464b /Python
parent5f1e8b4d249f62dfd81191bcadc4960d01e67ead (diff)
downloadcpython-e130a07eb20c4b655d182d5d10d778c7584efe55.zip
cpython-e130a07eb20c4b655d182d5d10d778c7584efe55.tar.gz
cpython-e130a07eb20c4b655d182d5d10d778c7584efe55.tar.bz2
bpo-36356: Fix memory leak in _PyPreConfig_Read() (GH-12425)
_PyPreConfig_Read() now free 'old_old' at exit.
Diffstat (limited to 'Python')
-rw-r--r--Python/preconfig.c1
1 files changed, 1 insertions, 0 deletions
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;
}