From a53551cba86bb67efcb6105fdc337a36c43132bd Mon Sep 17 00:00:00 2001 From: Roman Savchenko Date: Wed, 28 May 2014 22:16:56 +0200 Subject: 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 --- libavutil/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavutil') diff --git a/libavutil/frame.c b/libavutil/frame.c index cc4bfcdf4b..90485523e4 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -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); -- cgit v1.2.3