sortedcache: plug leaked file descriptor

This commit is contained in:
Patrick Steinhardt 2016-11-15 12:53:53 +01:00
parent 1d683c1d2e
commit 24b2182c5a

View File

@ -216,6 +216,7 @@ int git_sortedcache_lockandload(git_sortedcache *sc, git_buf *buf)
if (p_fstat(fd, &st) < 0) {
giterr_set(GITERR_OS, "failed to stat file");
error = -1;
(void)p_close(fd);
goto unlock;
}