cache: remove redundant free()

This code used to check/free multiple things, so the argument to free()
was not always NULL. After the code was simplified, the free() became
redundant.
This commit is contained in:
wm4 2017-01-09 13:18:11 +01:00
parent c4ad2732f9
commit afcf3e154a
1 changed files with 1 additions and 3 deletions

View File

@ -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.