stand/efi/eficom: Free comc_port if we can't find the serial port
If we can't find the serial port, free comc_port and return early. The serial port just isn't there. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D40223
This commit is contained in:
parent
e5d4e036f2
commit
46927f6744
@ -329,6 +329,16 @@ comc_probe(struct console *sc)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If there's no sio, then the device isn't there, so just return since
|
||||
* the present flags aren't yet set.
|
||||
*/
|
||||
if (comc_port->sio == NULL) {
|
||||
free(comc_port);
|
||||
comc_port = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (env != NULL)
|
||||
unsetenv("efi_com_port");
|
||||
snprintf(value, sizeof (value), "%u", comc_port->ioaddr);
|
||||
|
Loading…
Reference in New Issue
Block a user