diff options
Diffstat (limited to 'src/util/disk_cache.c')
-rw-r--r-- | src/util/disk_cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index e5b21b9a79f..d1f14736725 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -758,7 +758,11 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest, free(out); return 0; } - write_all(dest, out, ret); + ssize_t written = write_all(dest, out, ret); + if (written == -1) { + free(out); + return 0; + } free(out); return ret; #else |