diff options
author | Zachary Amsden <zamsden@redhat.com> | 2009-07-30 00:15:00 -1000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 21:23:39 -0500 |
commit | af0f38c5df8522d2f67edf6edcdab83572f58c8d (patch) | |
tree | 8e4a034f49fdb6ebb243562441ebd99db7e1464c | |
parent | a5435be94307d08d143b2b4c2ee68055cd10cf58 (diff) |
Don't segfault when changing VNC password on an SDL display.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | vnc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2182,6 +2182,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; |