提交 9159eb9a 编写于 作者: P Peter Maydell

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: NPeter Maydell <peter.maydell@linaro.org>
...@@ -64,7 +64,7 @@ static VirtIOSerialPort *find_port_by_name(char *name) ...@@ -64,7 +64,7 @@ static VirtIOSerialPort *find_port_by_name(char *name)
VirtIOSerialPort *port; VirtIOSerialPort *port;
QTAILQ_FOREACH(port, &vser->ports, next) { QTAILQ_FOREACH(port, &vser->ports, next) {
if (!strcmp(port->name, name)) { if (port->name && !strcmp(port->name, name)) {
return port; return port;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册