Commit 98748a4a authored by Tristan Matthews's avatar Tristan Matthews

shine: avoid double free

If subsequent malloc or realloc failed, free would be called on a dangling
pointer.
parent 47a008aa
...@@ -176,6 +176,7 @@ static block_t *GetPCM( encoder_t *p_enc, block_t *p_block ) ...@@ -176,6 +176,7 @@ static block_t *GetPCM( encoder_t *p_enc, block_t *p_block )
i_buffer = p_sys->i_buffer; i_buffer = p_sys->i_buffer;
p_sys->i_buffer = 0; p_sys->i_buffer = 0;
free( p_sys->p_buffer ); free( p_sys->p_buffer );
p_sys->p_buffer = NULL;
} }
memcpy( p_pcm_block->p_buffer + i_buffer, memcpy( p_pcm_block->p_buffer + i_buffer,
......
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