This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH,HURD] sendto: do not crash when addr is NULL
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Pino Toscano <toscano dot pino at tiscali dot it>
- Cc: libc-alpha at sourceware dot org, bug-hurd at gnu dot org
- Date: Tue, 12 Jun 2012 10:16:33 -0700 (PDT)
- Subject: Re: [PATCH,HURD] sendto: do not crash when addr is NULL
- References: <201205202258.36132.toscano.pino@tiscali.it><20120521200003.2B3AE2C080@topped-with-meat.com><201206072046.11047.toscano.pino@tiscali.it>
That's almost right, but you should avoid calling __mach_port_deallocate
if APORT is MACH_PORT_NULL. Also, avoid shadowing the local variable ERR
with one of the same name in the subfunction.
Thanks,
Roland