]> git.ipfire.org Git - thirdparty/qemu.git/commit
vnc: rework VncState release workflow
authorChris Webb <chris@arachsys.com>
Wed, 26 Aug 2009 22:52:43 +0000 (22:52 +0000)
committerGlauber Costa <glommer@redhat.com>
Thu, 27 Aug 2009 09:23:11 +0000 (05:23 -0400)
commitc2723a9606dae5af5c614a55296ee37e2ed7801a
tree70593b0e8bf337c039deb16380a5bb0942a70f16
parent07ca62486bfdff1384aea7aac5bfd6cd34df03a1
vnc: rework VncState release workflow

Split socket closing and releasing of VncState into two steps. First close
the socket and set the variable to -1 to indicate shutdown in progress. Do
the actual release in a few places where we can be sure it doesn't cause
trouble in form of use-after-free. Add some checks for a valid socket handle
to make sure we don't try to use the closed socket.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Backported to 0.10-stable, removing references to vs->force_update and
changing vnc_disconnect_finish() to match the code in the 0.10 version of
vnc_client_io_error() in place of the master branch version.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Glauber Costa <glommer@redhat.com>
vnc.c