Skip to content

Commit 24b2182

Browse files
committed
sortedcache: plug leaked file descriptor
1 parent 1d683c1 commit 24b2182

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sortedcache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ int git_sortedcache_lockandload(git_sortedcache *sc, git_buf *buf)
216216
if (p_fstat(fd, &st) < 0) {
217217
giterr_set(GITERR_OS, "failed to stat file");
218218
error = -1;
219+
(void)p_close(fd);
219220
goto unlock;
220221
}
221222

0 commit comments

Comments
 (0)