Fix windows unmapping of anonymous index slice

pull/8796/head
Jason Wilder 2017-09-12 10:30:10 -06:00
parent b4b3c159cc
commit 7d467c2047
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"io"
"math"
"os"
"runtime"
"sync"
"sync/atomic"
@ -1033,6 +1034,10 @@ func (d *indirectIndex) Size() uint32 {
}
func (d *indirectIndex) Close() error {
// Windows doesn't use the anonymous map for the offsets index
if runtime.GOOS == "windows" {
return nil
}
return munmap(d.offsets[:cap(d.offsets)])
}