mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-11 03:40:06 +00:00
hurd: Fix spurious port deallocation
* sysdeps/mach/hurd/dl-sysdep.c (__mmap): Do not deallocate memobj_wr when it is MACH_PORT_NULL.
This commit is contained in:
parent
44c637ce80
commit
561ff1ec42
@ -1,3 +1,8 @@
|
||||
2016-10-31 Brent W. Baccala <cosine@freesoft.org>
|
||||
|
||||
* sysdeps/mach/hurd/dl-sysdep.c (__mmap): Do not deallocate memobj_wr
|
||||
when it is MACH_PORT_NULL.
|
||||
|
||||
2016-10-31 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #20707]
|
||||
|
@ -473,7 +473,8 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
|
||||
err = __io_map ((mach_port_t) fd, &memobj_rd, &memobj_wr);
|
||||
if (err)
|
||||
return __hurd_fail (err), MAP_FAILED;
|
||||
__mach_port_deallocate (__mach_task_self (), memobj_wr);
|
||||
if (memobj_wr != MACH_PORT_NULL)
|
||||
__mach_port_deallocate (__mach_task_self (), memobj_wr);
|
||||
}
|
||||
|
||||
mapaddr = (vm_address_t) addr;
|
||||
|
Loading…
Reference in New Issue
Block a user