diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-04-12 08:09:08 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2017-04-12 08:09:08 +0200 |
commit | 38b6e700272b387aaa959a5d362467e8bcd836b4 (patch) | |
tree | 0d33bd0e926d417e8bac0cb30d4baf594dc3c28d /tests/diff/patchid.c | |
parent | e572b63121dccf71054beeb62d4b18e618379049 (diff) | |
download | libgit2-38b6e700272b387aaa959a5d362467e8bcd836b4.tar.gz |
fileops: fix leaking fd in `mmap_ro_file`
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.
Diffstat (limited to 'tests/diff/patchid.c')
0 files changed, 0 insertions, 0 deletions