diff options
Diffstat (limited to 'sysdeps/mach/hurd/recv.c')
-rw-r--r-- | sysdeps/mach/hurd/recv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c index 3bd5c16fbd..1783e38dcb 100644 --- a/sysdeps/mach/hurd/recv.c +++ b/sysdeps/mach/hurd/recv.c @@ -54,7 +54,8 @@ __recv (int fd, void *buf, size_t n, int flags) if (err) return __hurd_sockfail (fd, flags, err); - __mach_port_deallocate (__mach_task_self (), addrport); + if (MACH_PORT_VALID (addrport)) + __mach_port_deallocate (__mach_task_self (), addrport); __vm_deallocate (__mach_task_self (), (vm_address_t) cdata, clen); if (bufp != buf) |