add more check befor destory the buffer
Unified · Split
| @@ -143,7 +143,7 @@ out: · 142 unmodified lines | |||
| 143 | 143 | ||
| 144 | void av_file_unmap(uint8_t *bufptr, size_t size) | 144 | void av_file_unmap(uint8_t *bufptr, size_t size) |
| 145 | { | 145 | { |
| 146 | if (!size) | 146 | if (!size || !bufptr) |
| 147 | return; | 147 | return; |
| 148 | #if HAVE_MMAP | 148 | #if HAVE_MMAP |
| 149 | munmap(bufptr, size); | 149 | munmap(bufptr, size); |