From: Coiby Xu <[email protected]> When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function.
Signed-off-by: Coiby Xu <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]> --- contrib/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 09bdff18f3..bfec8a881a 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -1918,6 +1918,7 @@ vu_deinit(VuDev *dev) } if (vq->kick_fd != -1) { + dev->remove_watch(dev, vq->kick_fd); close(vq->kick_fd); vq->kick_fd = -1; } -- 2.26.2
