Commit a53551cb authored by Roman Savchenko's avatar Roman Savchenko Committed by 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: 's avatarAnton Khirnov <anton@khirnov.net>
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment