forked from FFmpeg/FFmpeg
Merge commit '67e285ceca1cb602a5ab87010b30d904527924fe'
* commit '67e285ceca1cb602a5ab87010b30d904527924fe': mem: Handle av_reallocp(..., 0) properly Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
6c169c2fa4
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,10 @@ int av_reallocp(void *ptr, size_t size)
|
|||
void **ptrptr = ptr;
|
||||
void *ret;
|
||||
|
||||
if (!size) {
|
||||
av_freep(ptr);
|
||||
return 0;
|
||||
}
|
||||
ret = av_realloc(*ptrptr, size);
|
||||
|
||||
if (!ret) {
|
||||
|
|
Loading…
Add table
Reference in a new issue