Commit 95780f4d authored by Jun Zhao's avatar Jun Zhao

avutil/file: add more check befor destory the buffer

add more check befor destory the buffer
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 7ce15b1d
...@@ -143,7 +143,7 @@ out: ...@@ -143,7 +143,7 @@ out:
void av_file_unmap(uint8_t *bufptr, size_t size) void av_file_unmap(uint8_t *bufptr, size_t size)
{ {
if (!size) if (!size || !bufptr)
return; return;
#if HAVE_MMAP #if HAVE_MMAP
munmap(bufptr, size); munmap(bufptr, size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment