aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/asfdec_o.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-08-18 09:35:56 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-08-18 09:35:56 +0200
commit649b2e4c8308c478d6c9fb892191121f12e3c0d3 (patch)
tree1a0ad6a5b718a5174ff86296392f38530dfe2cae /libavformat/asfdec_o.c
parent4b6ccccb03ba23ddf5478235fb7bae2d1fe3e952 (diff)
parent317cfaa5e09755ed0b34af512ec687963a67bdbf (diff)
downloadffmpeg-649b2e4c8308c478d6c9fb892191121f12e3c0d3.tar.gz
Merge commit '317cfaa5e09755ed0b34af512ec687963a67bdbf'
* commit '317cfaa5e09755ed0b34af512ec687963a67bdbf': asfdec: prevent the memory leak in the asf_read_metada_obj Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat/asfdec_o.c')
-rw-r--r--libavformat/asfdec_o.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index adc7f69bfb..fa00813a81 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -590,8 +590,10 @@ static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g)
buflen);
if (!strcmp(name, "AspectRatioX") || !strcmp(name, "AspectRatioY")) {
ret = asf_store_aspect_ratio(s, st_num, name, type);
- if (ret < 0)
- return ret;
+ if (ret < 0) {
+ av_freep(&name);
+ break;
+ }
} else {
if (st_num < ASF_MAX_STREAMS) {
if ((ret = process_metadata(s, name, name_len, val_len, type,