hurd: optimize exec cleanup
When ports are nul we do not need to request their deallocation. It is also useless to look for them in portnames.
This commit is contained in:
parent
54dda2cdba
commit
41a11a5e83
|
@ -383,6 +383,7 @@ retry:
|
|||
exec call. */
|
||||
|
||||
for (i = 0; i < _hurd_nports; ++i)
|
||||
if (ports[i] != MACH_PORT_NULL)
|
||||
{
|
||||
*pdp++ = ports[i];
|
||||
for (j = 0; j < nportnames; j++)
|
||||
|
@ -390,6 +391,7 @@ retry:
|
|||
portnames[j] = MACH_PORT_NULL;
|
||||
}
|
||||
for (i = 0; i < dtablesize; ++i)
|
||||
if (dtable[i] != MACH_PORT_NULL)
|
||||
{
|
||||
*pdp++ = dtable[i];
|
||||
for (j = 0; j < nportnames; j++)
|
||||
|
|
|
@ -611,6 +611,7 @@ __rtld_execve (const char *file_name, char *const argv[],
|
|||
}
|
||||
|
||||
for (i = 0; i < portarraysize; ++i)
|
||||
if (ports[i] != MACH_PORT_NULL)
|
||||
{
|
||||
*pdp++ = ports[i];
|
||||
for (j = 0; j < nportnames; j++)
|
||||
|
@ -618,6 +619,7 @@ __rtld_execve (const char *file_name, char *const argv[],
|
|||
portnames[j] = MACH_PORT_NULL;
|
||||
}
|
||||
for (i = 0; i < dtablesize; ++i)
|
||||
if (dtable[i] != MACH_PORT_NULL)
|
||||
{
|
||||
*pdp++ = dtable[i];
|
||||
for (j = 0; j < nportnames; j++)
|
||||
|
|
Loading…
Reference in a new issue