diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-21 21:39:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-21 22:12:46 +0100 |
commit | 42f3cb419aa0903eb11ac69ea94e636992a170ca (patch) | |
tree | b0d8086f6074ccca9389f54e8de514855bbe77cb /libavfilter | |
parent | 15ed7ca437a89796759390956f117555e703043e (diff) | |
parent | 863ee8a855b8ce27ffef41479eb66da58763faed (diff) | |
download | ffmpeg-42f3cb419aa0903eb11ac69ea94e636992a170ca.tar.gz |
Merge commit '863ee8a855b8ce27ffef41479eb66da58763faed'
* commit '863ee8a855b8ce27ffef41479eb66da58763faed':
lavfi: clean memory on error in ADD_FORMAT()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/formats.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 816042987d..2fc07eb4e0 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -320,8 +320,10 @@ do { \ \ fmts = av_realloc((*f)->list, \ sizeof(*(*f)->list) * ((*f)->nb + 1));\ - if (!fmts) \ + if (!fmts) { \ + av_freep(&f); \ return AVERROR(ENOMEM); \ + } \ \ (*f)->list = fmts; \ (*f)->list[(*f)->nb++] = fmt; \ |