mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/amit/tags/vser-for-2.3-1' into staging
virtio-serial: fix crash on port hotplug when a previously-added port did not have the 'name' property set. # gpg: Signature made Wed Mar 11 11:13:53 2015 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-for-2.3-1: virtio-serial: fix segfault on NULL port names Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -64,7 +64,7 @@ static VirtIOSerialPort *find_port_by_name(char *name)
|
||||
VirtIOSerialPort *port;
|
||||
|
||||
QTAILQ_FOREACH(port, &vser->ports, next) {
|
||||
if (!strcmp(port->name, name)) {
|
||||
if (port->name && !strcmp(port->name, name)) {
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user