frame: fix the error path in av_frame_copy_props()

First free metadata, then the side data it is contained in.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Roman Savchenko 2014-05-28 22:16:56 +02:00 committed by Anton Khirnov
parent ad0fe2f401
commit a53551cba8

View File

@ -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);