mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avutil/file: add more check befor destory the buffer
add more check befor destory the buffer Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
7ce15b1d43
commit
95780f4dcb
@ -143,7 +143,7 @@ out:
|
||||
|
||||
void av_file_unmap(uint8_t *bufptr, size_t size)
|
||||
{
|
||||
if (!size)
|
||||
if (!size || !bufptr)
|
||||
return;
|
||||
#if HAVE_MMAP
|
||||
munmap(bufptr, size);
|
||||
|
Loading…
Reference in New Issue
Block a user