FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fileops: fix leaking fd in `mmap_ro_file` by pks-t · Pull Request #4201 · libgit2/libgit2 · GitHub

Repository navigation

fileops: fix leaking fd in mmap_ro_file - #4201

Merged
ethomson merged 1 commit into
libgit2:masterfrom
pks-t:pks/fileops-fd-leak
Apr 12, 2017
Merged

ethomson merged 1 commit into
libgit2:masterfrom
pks-t:pks/fileops-fd-leak

Conversation

pks-t commented Apr 12, 2017

Copy link
Copy Markdown
Member

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 merged commit f9d3b0d into libgit2:master Apr 12, 2017
pks-t deleted the pks/fileops-fd-leak branch April 28, 2017 11:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL