Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f71e743

Browse filesBrowse files
bpo-35720: Fixing a memory leak in pymain_parse_cmdline_impl() (GH-11528)
When the loop in the pymain_read_conf function in this same file calls pymain_init_cmdline_argv() a 2nd time, the pymain->command buffer of wchar_t is overriden and the previously allocated memory is never freed. (cherry picked from commit 35ca182) Co-authored-by: Lucas Cimon <lucas.cimon@gmail.com>
1 parent d1dd6be commit f71e743
Copy full SHA for f71e743

File tree

Expand file treeCollapse file tree

2 files changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-0
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a minor memory leak in pymain_parse_cmdline_impl function in Modules/main.c

‎Modules/main.c

Copy file name to clipboardExpand all lines: Modules/main.c
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,6 +2165,7 @@ pymain_read_conf(_PyMain *pymain, _PyCoreConfig *config, _PyCmdline *cmdline)
21652165
goto done;
21662166
}
21672167
pymain_clear_cmdline(pymain, cmdline);
2168+
pymain_clear_pymain(pymain);
21682169
memset(cmdline, 0, sizeof(*cmdline));
21692170

21702171
cmdline_get_global_config(cmdline);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.