mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/fs: properly handle the case when data=nil is passed to mUnmap
This commit is contained in:
parent
22acd84019
commit
ddc61e2309
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ func mmap(fd int, length int) ([]byte, error) {
|
|||
func mUnmap(data []byte) error {
|
||||
// flush is not needed, since we perform only reading operation.
|
||||
// In case of write, additional call FlushViewOfFile must be performed.
|
||||
addr := uintptr(unsafe.Pointer(&data[0]))
|
||||
addr := uintptr(unsafe.Pointer(unsafe.SliceData(data)))
|
||||
|
||||
mmapByAddrLock.Lock()
|
||||
h, ok := mmapByAddr[addr]
|
||||
|
|
Loading…
Reference in a new issue