projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5b2716
)
char: Detect chardev release by NULL handlers as well as NULL opaque
author
Amit Shah
<amit.shah@redhat.com>
Mon, 25 Apr 2011 09:48:22 +0000
(15:18 +0530)
committer
Amit Shah
<amit.shah@redhat.com>
Thu, 28 Apr 2011 05:41:04 +0000
(11:11 +0530)
Juan says he prefers these extra checks to ensure a user of a chardev is
releasing it.
Requested-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
qemu-char.c
patch
|
blob
|
history
diff --git
a/qemu-char.c
b/qemu-char.c
index eaf6571ac8a911a504b570e2677f25c7cf9db700..5e04a20b8c4dd04ff14be2679439f51d237873d9 100644
(file)
--- a/
qemu-char.c
+++ b/
qemu-char.c
@@
-197,7
+197,7
@@
void qemu_chr_add_handlers(CharDriverState *s,
IOEventHandler *fd_event,
void *opaque)
{
- if (!opaque) {
+ if (!opaque
&& !fd_can_read && !fd_read && !fd_event
) {
/* chr driver being released. */
++s->avail_connections;
}