diff options
author | Zachary Amsden <zamsden@redhat.com> | 2009-07-30 00:15:00 -1000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-24 08:01:40 -0500 |
commit | 7ef923310a73b8de3e1a07e901b62a2c50dd36be (patch) | |
tree | c8e62a4fe1ff68388457b1479346fb9f3976b3d7 | |
parent | 907500095851230a480b14bc852c4e49d32cb16d (diff) | |
download | qemu-7ef923310a73b8de3e1a07e901b62a2c50dd36be.zip qemu-7ef923310a73b8de3e1a07e901b62a2c50dd36be.tar.gz qemu-7ef923310a73b8de3e1a07e901b62a2c50dd36be.tar.bz2 |
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
@@ -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; |