From d0513623aee6bca7b6458a12fc652ac028f03753 Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 1 Dec 2008 01:48:36 +0000 Subject: Don't try to select on an invalid VNC socket when init fails. Otherwise we get a segfault. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5840 c046a42c-6fe2-441c-8c8c-71466251a162 --- vnc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vnc.c') diff --git a/vnc.c b/vnc.c index f663b385d1..1d9c113539 100644 --- a/vnc.c +++ b/vnc.c @@ -2419,6 +2419,7 @@ int vnc_display_open(DisplayState *ds, const char *display) } if (-1 == vs->lsock) { free(dpy); + return -1; } else { free(vs->display); vs->display = dpy; -- cgit v1.2.3