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

Conversation

@addaleax
Copy link
Member

This previously leaked memory in the ‘success’ case.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. os Issues and PRs related to the os subsystem. labels Oct 26, 2018
This previously leaked memory in the ‘success’ case.
@addaleax
Copy link
Member Author

src/node_os.cc Outdated
}

const int err = uv_os_get_passwd(&pwd);
OnScopeLeave free_passwd([&]() { uv_os_free_passwd(&pwd); });
Copy link
Member

Choose a reason for hiding this comment

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

is it safe to call it if uv_os_get_passwd returned an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think you’re right, we shouldn’t do that. I’ve moved it below the conditional 👍

@danbev
Copy link
Contributor

danbev commented Oct 31, 2018

Landed in d690a87.

@danbev danbev closed this Oct 31, 2018
danbev pushed a commit that referenced this pull request Oct 31, 2018
This previously leaked memory in the ‘success’ case.

PR-URL: #23893
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Nov 1, 2018
This previously leaked memory in the ‘success’ case.

PR-URL: #23893
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

Lands cleanly on 10 but not on 8

It would appear the leak actually doesn't exist on 8 so I'm marking as don't land

@addaleax addaleax deleted the os-mem-leak branch November 27, 2018 00:57
MylesBorins pushed a commit that referenced this pull request Nov 27, 2018
This previously leaked memory in the ‘success’ case.

PR-URL: #23893
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Nov 27, 2018
rvagg pushed a commit that referenced this pull request Nov 28, 2018
This previously leaked memory in the ‘success’ case.

PR-URL: #23893
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
This previously leaked memory in the ‘success’ case.

PR-URL: #23893
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. os Issues and PRs related to the os subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

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