Commit d2f9d361 authored by Francois Cartegnie's avatar Francois Cartegnie

input: access: fix double free

If block comes from sys from previous read
and reaches zero payload, it will be double freed.

(happens when removing stream_filters between
demux/access)
parent f3aa6fb0
...@@ -237,7 +237,10 @@ static ssize_t AStreamReadBlock(stream_t *s, void *buf, size_t len) ...@@ -237,7 +237,10 @@ static ssize_t AStreamReadBlock(stream_t *s, void *buf, size_t len)
block->i_buffer -= copy; block->i_buffer -= copy;
if (block->i_buffer == 0) if (block->i_buffer == 0)
{
block_Release(block); block_Release(block);
sys->block = NULL;
}
else else
sys->block = block; sys->block = block;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment