Commit 87c3db49 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: webvtt: release memstream empty alloc

parent a9b35014
......@@ -151,6 +151,11 @@ static void memstream_Grab( struct vlc_memstream *ms, void **pp, size_t *pi )
{
if( ms->stream != NULL && vlc_memstream_close( ms ) == VLC_SUCCESS )
{
if( ms->length == 0 )
{
free( ms->ptr );
ms->ptr = NULL;
}
*pp = ms->ptr;
*pi = ms->length;
}
......
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