Message ID | 1251291946-25821-13-git-send-email-glommer@redhat.com |
---|---|
State | Superseded |
Headers | show |
diff --git a/vnc.c b/vnc.c index c0700c0..1652029 100644 --- a/vnc.c +++ b/vnc.c @@ -2438,6 +2438,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;