Commit 720773f5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

transcode: audio: Fix potential user after free

parent 28adaf71
...@@ -353,6 +353,8 @@ error: ...@@ -353,6 +353,8 @@ error:
end: end:
/* Drain encoder */ /* Drain encoder */
if( unlikely( !b_error && in == NULL ) ) if( unlikely( !b_error && in == NULL ) )
{
if( id->p_encoder->p_module )
{ {
block_t *p_block; block_t *p_block;
do { do {
...@@ -360,6 +362,7 @@ end: ...@@ -360,6 +362,7 @@ end:
block_ChainAppend( out, p_block ); block_ChainAppend( out, p_block );
} while( p_block ); } while( p_block );
} }
}
return b_error ? VLC_EGENERIC : VLC_SUCCESS; return b_error ? VLC_EGENERIC : VLC_SUCCESS;
} }
......
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