aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2019-08-30 09:09:16 +0800
committerJun Zhao <barryjzhao@tencent.com>2019-08-30 09:16:01 +0800
commit95780f4dcbf89f511e5d0c19035221cea0826d7d (patch)
tree2be0ca367adb8a57893477dd528d87fe19e04435
parent7ce15b1d439400cba1aa09e9ee80aacbd84eb988 (diff)
downloadffmpeg-95780f4dcbf89f511e5d0c19035221cea0826d7d.tar.gz
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>
-rw-r--r--libavutil/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index b91c2fa391..f228b723ec 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -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);