mirror of
https://github.com/mii443/qemu.git
synced 2025-08-31 11:29:26 +00:00
Merge remote-tracking branch 'remotes/amit/tags/vser-2.2.0-queue-2' into staging
Fixes a crash when a virtio-serial port is added without a name to it. # gpg: Signature made Fri 07 Nov 2014 04:58:05 GMT using RSA key ID 854083B6 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit/tags/vser-2.2.0-queue-2: virtio-serial: avoid crash when port has no name Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@ -871,7 +871,7 @@ static void virtser_port_device_realize(DeviceState *dev, Error **errp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (find_port_by_name(port->name)) {
|
||||
if (port->name != NULL && find_port_by_name(port->name)) {
|
||||
error_setg(errp, "virtio-serial-bus: A port already exists by name %s",
|
||||
port->name);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user