diff options
| author | Carlos MartÃn Nieto <carlosmn@github.com> | 2016-11-15 16:28:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-15 16:28:10 +0100 |
| commit | 0cd162be8887069823eb8e987be551fdd593c623 (patch) | |
| tree | b69f6d5fdc7de53a2e96a7bfe0c1975958cfb93e /src/sortedcache.c | |
| parent | 1db3035d74a8f734d65b4e779d3e4b22cfd90ebb (diff) | |
| parent | 613381fc1461514fdbb1518799bcee0345fdece6 (diff) | |
| download | libgit2-0cd162be8887069823eb8e987be551fdd593c623.tar.gz | |
Merge pull request #4008 from pks-t/pks/sortedcache-fd-leak
sortedcache: plug leaked file descriptor
Diffstat (limited to 'src/sortedcache.c')
| -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; } |
