mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '863ee8a855b8ce27ffef41479eb66da58763faed'
* commit '863ee8a855b8ce27ffef41479eb66da58763faed': lavfi: clean memory on error in ADD_FORMAT() Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
42f3cb419a
@ -320,8 +320,10 @@ do { \
|
|||||||
\
|
\
|
||||||
fmts = av_realloc((*f)->list, \
|
fmts = av_realloc((*f)->list, \
|
||||||
sizeof(*(*f)->list) * ((*f)->nb + 1));\
|
sizeof(*(*f)->list) * ((*f)->nb + 1));\
|
||||||
if (!fmts) \
|
if (!fmts) { \
|
||||||
|
av_freep(&f); \
|
||||||
return AVERROR(ENOMEM); \
|
return AVERROR(ENOMEM); \
|
||||||
|
} \
|
||||||
\
|
\
|
||||||
(*f)->list = fmts; \
|
(*f)->list = fmts; \
|
||||||
(*f)->list[(*f)->nb++] = fmt; \
|
(*f)->list[(*f)->nb++] = fmt; \
|
||||||
|
Loading…
Reference in New Issue
Block a user