avfilter/formats: use av_realloc_array in ADD_FORMAT()
This commit is contained in:
parent
38fb183b12
commit
93d9ce7cec
@ -308,8 +308,8 @@ do { \
|
|||||||
if (!(*f) && !(*f = av_mallocz(sizeof(**f)))) \
|
if (!(*f) && !(*f = av_mallocz(sizeof(**f)))) \
|
||||||
return AVERROR(ENOMEM); \
|
return AVERROR(ENOMEM); \
|
||||||
\
|
\
|
||||||
fmts = av_realloc((*f)->list, \
|
fmts = av_realloc_array((*f)->list, (*f)->nb + 1, \
|
||||||
sizeof(*(*f)->list) * ((*f)->nb + 1));\
|
sizeof(*(*f)->list)); \
|
||||||
if (!fmts) { \
|
if (!fmts) { \
|
||||||
if (!oldf) \
|
if (!oldf) \
|
||||||
av_freep(f); \
|
av_freep(f); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user