summaryrefslogtreecommitdiffstats
path: root/stream/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/cache.c')
-rw-r--r--stream/cache.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/stream/cache.c b/stream/cache.c
index 85b78f9038..b2ff1a91c8 100644
--- a/stream/cache.c
+++ b/stream/cache.c
@@ -338,10 +338,8 @@ static int resize_cache(struct priv *s, int64_t size)
buffer_size += s->back_size;
unsigned char *buffer = malloc(buffer_size);
- if (!buffer) {
- free(buffer);
+ if (!buffer)
return STREAM_ERROR;
- }
if (s->buffer) {
// Copy & free the old ringbuffer data.