fileops.c
26.1 KB
-
fileops: fix leaking fd in `mmap_ro_file` · 38b6e700
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.
Patrick Steinhardt committed