diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-08-30 04:09:16 +0300 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2019-08-30 04:16:01 +0300 |
commit | 95780f4dcbf89f511e5d0c19035221cea0826d7d (patch) | |
tree | 2be0ca367adb8a57893477dd528d87fe19e04435 /libavutil | |
parent | 7ce15b1d439400cba1aa09e9ee80aacbd84eb988 (diff) |
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>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/file.c | 2 |
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); |