Drop MMapOpts.MappingIdentity reference in loader.mapSegment.
PiperOrigin-RevId: 200261995 Change-Id: I7e460b18ceab2c23096bdeb7416159d6e774aaf7
This commit is contained in:
parent
2dc9cd7bf7
commit
7a10df454b
|
@ -271,6 +271,11 @@ func mapSegment(ctx context.Context, m *mm.MemoryManager, f *fs.File, phdr *elf.
|
|||
Perms: prot,
|
||||
MaxPerms: usermem.AnyAccess,
|
||||
}
|
||||
defer func() {
|
||||
if mopts.MappingIdentity != nil {
|
||||
mopts.MappingIdentity.DecRef()
|
||||
}
|
||||
}()
|
||||
if err := f.ConfigureMMap(ctx, &mopts); err != nil {
|
||||
ctx.Infof("File is not memory-mappable: %v", err)
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue