projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70f23b7
)
Avoid SEGV in IOHandler dispatch, by Daniel P. Berrange.
author
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 25 Aug 2007 01:34:19 +0000
(
01:34
+0000)
committer
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 25 Aug 2007 01:34:19 +0000
(
01:34
+0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3132
c046a42c
-6fe2-441c-8c8c-
71466251a162
vl.c
patch
|
blob
|
history
diff --git
a/vl.c
b/vl.c
index 9bcffc01329970e09627001e3d983d89cabf6af9..9009ce588df0baa5d89613dc1221fc7b544229d4 100644
(file)
--- a/
vl.c
+++ b/
vl.c
@@
-6823,12
+6823,10
@@
void main_loop_wait(int timeout)
IOHandlerRecord **pioh;
for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
- if (ioh->deleted)
- continue;
- if (FD_ISSET(ioh->fd, &rfds)) {
+ if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
ioh->fd_read(ioh->opaque);
}
- if (FD_ISSET(ioh->fd, &wfds)) {
+ if (
!ioh->deleted && ioh->fd_write &&
FD_ISSET(ioh->fd, &wfds)) {
ioh->fd_write(ioh->opaque);
}
}