summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-01-12-23-33-04.bpo-35720.LELKQx.rst1
-rw-r--r--Modules/main.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-01-12-23-33-04.bpo-35720.LELKQx.rst b/Misc/NEWS.d/next/Core and Builtins/2019-01-12-23-33-04.bpo-35720.LELKQx.rst
new file mode 100644
index 0000000..9c57ebc
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-01-12-23-33-04.bpo-35720.LELKQx.rst
@@ -0,0 +1 @@
+Fixed a minor memory leak in pymain_parse_cmdline_impl function in Modules/main.c \ No newline at end of file
diff --git a/Modules/main.c b/Modules/main.c
index 8e66ddd..da79a63 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -1376,6 +1376,7 @@ pymain_read_conf(_PyMain *pymain, _PyCoreConfig *config,
goto done;
}
pymain_clear_cmdline(pymain, cmdline);
+ pymain_clear_pymain(pymain);
memset(cmdline, 0, sizeof(*cmdline));
config->utf8_mode = new_utf8_mode;
config->coerce_c_locale = new_coerce_c_locale;