Commit 71eb04d9 authored by Thomas Guillem's avatar Thomas Guillem

es_format: fix rare double free

It could happen when i_extra was 0 but p_extra was not NULL (since malloc(0)
can return a valid pointer).
parent 24c731a8
......@@ -492,6 +492,8 @@ int es_format_Copy(es_format_t *restrict dst, const es_format_t *src)
ret = VLC_ENOMEM;
}
}
else
dst->p_extra = NULL;
if (src->i_cat == VIDEO_ES)
ret = video_format_Copy( &dst->video, &src->video );
......
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