bpo-35720: Fixing a memory leak in Modules/main.c:pymain_parse_cmdline_impl#11528
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
|
The Travis CI build failed with: The Azure Pipeline build failed because of a column in the |
There was a problem hiding this comment.
The if is useless: PyMem_RawFree(NULL) does nothing, the call is safe.
There was a problem hiding this comment.
Please move the call after pymain_clear_cmdline() call a few lines before, and leave the comment unchanged.
There was a problem hiding this comment.
Sorry, I included an extra commit by error. This is fixed now
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.
…nGH-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>
|
GH-11648 is a backport of this pull request to the 3.7 branch. |
) 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>
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.
https://bugs.python.org/issue35720