提交 a53551cb 编写于 作者: R Roman Savchenko 提交者: Anton Khirnov

frame: fix the error path in av_frame_copy_props()

First free metadata, then the side data it is contained in.
Signed-off-by: NAnton Khirnov <anton@khirnov.net>
上级 ad0fe2f4
......@@ -383,8 +383,8 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
if (!sd_dst) {
for (i = 0; i < dst->nb_side_data; i++) {
av_freep(&dst->side_data[i]->data);
av_freep(&dst->side_data[i]);
av_dict_free(&dst->side_data[i]->metadata);
av_freep(&dst->side_data[i]);
}
av_freep(&dst->side_data);
return AVERROR(ENOMEM);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册