mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
fftools/cmdutils: add error handling to allocate_array_elem()
This commit is contained in:
parent
8eb5adeab8
commit
6be4a29397
5 changed files with 51 additions and 14 deletions
|
|
@ -1002,7 +1002,7 @@ void *allocate_array_elem(void *ptr, size_t elem_size, int *nb_elems)
|
|||
|
||||
if (!(new_elem = av_mallocz(elem_size)) ||
|
||||
av_dynarray_add_nofree(ptr, nb_elems, new_elem) < 0)
|
||||
report_and_exit(AVERROR(ENOMEM));
|
||||
return NULL;
|
||||
return new_elem;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue