From 9752d2e6cc9b9e8070ec515db8ed8374683d0856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Thu, 2 Jul 2015 12:26:19 +0200 Subject: [PATCH] asfdec: prevent possible memory leak in the asf_read_metadata_obj Signed-off-by: Luca Barbato --- libavformat/asfdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index c12d8c79a0..f2dd489b99 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -572,7 +572,8 @@ static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g) if ((ret = process_metadata(s, name, name_len, val_len, type, &asf->asf_sd[st_num].asf_met)) < 0) break; - } + } else + av_freep(&name); } }