summaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-03-24 08:11:58 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-03-24 08:11:58 -0500
commit2c61aedae581340455fe7aab35ac3addae39ab2c (patch)
treea851ba09087f5291d2c412981efd6605118a9142 /qemu-char.c
parentf88063189547bf31e1f59d4a90166a624269d882 (diff)
parentca5b0fc1ac31e6a76dc0d316cc77fef459ec92cd (diff)
downloadqemu-2c61aedae581340455fe7aab35ac3addae39ab2c.tar.gz
qemu-2c61aedae581340455fe7aab35ac3addae39ab2c.tar.bz2
qemu-2c61aedae581340455fe7aab35ac3addae39ab2c.zip
Merge remote branch 'amit/for-anthony' into staging
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 31c9e79d98..03858d4ef7 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -197,6 +197,10 @@ void qemu_chr_add_handlers(CharDriverState *s,
IOEventHandler *fd_event,
void *opaque)
{
+ if (!opaque) {
+ /* chr driver being released. */
+ s->assigned = 0;
+ }
s->chr_can_read = fd_can_read;
s->chr_read = fd_read;
s->chr_event = fd_event;