History

avutil/file: add more check befor destory the buffer

add more check befor destory the buffer

Jun Zhao committed 7 years ago

Commit 95780f41 parent 7ce15b11 file · +1 −1Browse files

Unified · Split

libavutil/file.c+1−1
@@ -143,7 +143,7 @@ out: · 142 unmodified lines
143143
144144 void av_file_unmap(uint8_t *bufptr, size_t size)
145145 {
146− if (!size)
146+ if (!size || !bufptr)
147147 return;
148148 #if HAVE_MMAP
149149 munmap(bufptr, size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t