summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-21 21:39:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-21 22:12:46 +0100
commit42f3cb419aa0903eb11ac69ea94e636992a170ca (patch)
treeb0d8086f6074ccca9389f54e8de514855bbe77cb /libavfilter
parent15ed7ca437a89796759390956f117555e703043e (diff)
parent863ee8a855b8ce27ffef41479eb66da58763faed (diff)
downloadffmpeg-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.c4
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; \