Browse Source

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>
tags/n4.3
Jun Zhao 5 years ago
parent
commit
95780f4dcb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/file.c

+ 1
- 1
libavutil/file.c View File

@@ -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…
Cancel
Save