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

fileops: fix leaking fd in mmap_ro_file#4201

Merged
ethomson merged 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
pks-t:pks/fileops-fd-leakpks-t/libgit2:pks/fileops-fd-leakCopy head branch name to clipboard
Apr 12, 2017
Merged

fileops: fix leaking fd in mmap_ro_file#4201
ethomson merged 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
pks-t:pks/fileops-fd-leakpks-t/libgit2:pks/fileops-fd-leakCopy head branch name to clipboard

Conversation

@pks-t
Copy link
Member

@pks-t pks-t commented Apr 12, 2017

When the git_futils_mmap_ro_file function encounters an error after
the file has been opened, it will do a simple returns. Instead, we
should close the opened file descriptor to avoid a leak. This commit
fixes the issue.

When the `git_futils_mmap_ro_file` function encounters an error after
the file has been opened, it will do a simple returns. Instead, we
should close the opened file descriptor to avoid a leak. This commit
fixes the issue.
@ethomson ethomson merged commit f9d3b0d into libgit2:master Apr 12, 2017
@pks-t pks-t deleted the pks/fileops-fd-leak branch April 28, 2017 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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