qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 7ef9233] Don't segfault when changing VNC passwor


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 7ef9233] Don't segfault when changing VNC password on an SDLdisplay.
Date: Thu, 27 Aug 2009 22:03:58 -0000

From: Zachary Amsden <address@hidden>

Signed-off-by: Zachary Amsden <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/vnc.c b/vnc.c
index 4fde9aa..9dbe82a 100644
--- a/vnc.c
+++ b/vnc.c
@@ -2263,6 +2263,10 @@ int vnc_display_password(DisplayState *ds, const char 
*password)
 {
     VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
 
+    if (!vs) {
+        return -1;
+    }
+
     if (vs->password) {
         qemu_free(vs->password);
         vs->password = NULL;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]