mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
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>
This commit is contained in:
parent
9075000958
commit
7ef923310a
1 changed files with 4 additions and 0 deletions
4
vnc.c
4
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue