diff options
Diffstat (limited to 'CCache/stats.c')
-rw-r--r-- | CCache/stats.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CCache/stats.c b/CCache/stats.c index d2122bcd3..4d01d2afa 100644 --- a/CCache/stats.c +++ b/CCache/stats.c @@ -138,7 +138,10 @@ static void stats_update_size(enum stats stat, size_t size, size_t numfiles) memset(counters, 0, sizeof(counters)); - if (lock_fd(fd) != 0) return; + if (lock_fd(fd) != 0) { + close(fd); + return; + } /* read in the old stats */ stats_read_fd(fd, counters); |