diff --git a/vl.c b/vl.c
index ccc8d57..7ae69ab 100644
--- a/vl.c
+++ b/vl.c
@@ -966,6 +966,8 @@ int qemu_set_fd_handler2(int fd,
         QLIST_FOREACH(ioh, &io_handlers, next) {
             if (ioh->fd == fd) {
                 ioh->deleted = 1;
+                ioh->fd_read = NULL;
+                ioh->fd_write = NULL;
                 break;
             }
         }
