mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
lavfi: clean memory on error in ADD_FORMAT()
CC: libav-stable@libav.org Bug-Id: CID 1250334
This commit is contained in:
parent
fd9badd3cb
commit
863ee8a855
@ -188,8 +188,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; \
|
||||
|
Loading…
Reference in New Issue
Block a user