summaryrefslogtreecommitdiff
path: root/tests/diff/patchid.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-04-12 08:09:08 +0200
committerPatrick Steinhardt <ps@pks.im>2017-04-12 08:09:08 +0200
commit38b6e700272b387aaa959a5d362467e8bcd836b4 (patch)
tree0d33bd0e926d417e8bac0cb30d4baf594dc3c28d /tests/diff/patchid.c
parente572b63121dccf71054beeb62d4b18e618379049 (diff)
downloadlibgit2-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