Skip to content

Fixed a few leaks in /PC/bdist_wininst/install.c#2142

Closed
tiagofilipesilva wants to merge 1 commit intopython:masterfrom
tiagofilipesilva:master
Closed

Fixed a few leaks in /PC/bdist_wininst/install.c#2142
tiagofilipesilva wants to merge 1 commit intopython:masterfrom
tiagofilipesilva:master

Conversation

@tiagofilipesilva
Copy link
Copy Markdown

@tiagofilipesilva tiagofilipesilva commented Jun 12, 2017

This trivial commit fixes a few memory leaks in /PC/bdist_wininst/install.c

This commit fixes a few memory leaks in /PC/bdist_wininst/install.c
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other leaks in this code.

lines = (char **)realloc(lines,
sizeof(char *) * lines_buffer_size);
if (!lines)
if (!lines) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memory pointed by the old value of lines is leaked if realloc() returns NULL.

And seems lines is leaked in the code below.

@serhiy-storchaka serhiy-storchaka changed the title Fixed a few leaks Fixed a few leaks in /PC/bdist_wininst/install.c Mar 26, 2018
@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels Mar 26, 2018
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix a leak in realloc().

@bedevere-bot
Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@vstinner
Copy link
Copy Markdown
Member

I removed the " needs backport to 3.6" label, the 3.6 branch no longer accept bugfixes (only security fixes are accepted): https://devguide.python.org/#status-of-python-branches

@csabella
Copy link
Copy Markdown
Contributor

@serhiy-storchaka, it appears that the original creator of this pull request has abandoned the issue. Since this concerns refleaks, should this PR be closed a new one opened to address the problems? Thanks.

@vstinner
Copy link
Copy Markdown
Member

@serhiy-storchaka, it appears that the original creator of this pull request has abandoned the issue. Since this concerns refleaks, should this PR be closed a new one opened to address the problems? Thanks.

The author signed the CLA. You should try to find someone else to recreate this PR and fix the issue identified by @serhiy-storchaka.

@csabella csabella closed this May 13, 2019
@csabella
Copy link
Copy Markdown
Contributor

csabella commented May 13, 2019

Created bpo-36901 for this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants