diff options
author | Patrick Steinhardt <ps@pks.im> | 2016-11-15 12:53:53 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2016-11-15 12:53:53 +0100 |
commit | 24b2182c5a77945bedbc5de0f1b4a9b6f5d27284 (patch) | |
tree | b736bdfa76c2552042af409478f994da8bd4a1e6 | |
parent | 1d683c1d2e36631cfe7ff7e9fa930b0773604000 (diff) | |
download | libgit2-24b2182c5a77945bedbc5de0f1b4a9b6f5d27284.tar.gz |
sortedcache: plug leaked file descriptor
-rw-r--r-- | src/sortedcache.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sortedcache.c b/src/sortedcache.c index ed4199b71..5bd989a9f 100644 --- a/src/sortedcache.c +++ b/src/sortedcache.c @@ -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; } |