projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8778a7
)
virtio-serial: Fix check for 'assert'; prevent NULL derefs
author
Amit Shah
<amit.shah@redhat.com>
Fri, 30 Apr 2010 11:13:55 +0000
(16:43 +0530)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Mon, 3 May 2010 17:09:48 +0000
(12:09 -0500)
In the flush_queued_data() function, we expect port to be valid. Assert
only for port and not port || discard.
Reported-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-serial-bus.c
patch
|
blob
|
history
diff --git
a/hw/virtio-serial-bus.c
b/hw/virtio-serial-bus.c
index 97694d521635de498f97d658898e79a6cfe7bcb7..3ce95e8f1eaefedbecac938ce26dab9d65f06f3d 100644
(file)
--- a/
hw/virtio-serial-bus.c
+++ b/
hw/virtio-serial-bus.c
@@
-137,7
+137,7
@@
static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
static void flush_queued_data(VirtIOSerialPort *port, bool discard)
{
- assert(port
|| discard
);
+ assert(port);
do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard);
}