aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-02-11 17:33:33 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-02-16 08:48:00 +0100
commit9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b (patch)
tree5a5039ddfbc44a793fd37f29f3dfa6a9b17ff909 /ui
parent0e7d6f608339029404efd025ae9b8965ffe60087 (diff)
downloadqemu-9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b.zip
qemu-9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b.tar.gz
qemu-9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b.tar.bz2
vnc: fix coverity warning
vnc_display_local_addr will not be called with an invalid display id. Add assert() to silence coverity warning about a null pointer dereference. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 14289fd..10a2724 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3248,6 +3248,7 @@ char *vnc_display_local_addr(const char *id)
{
VncDisplay *vs = vnc_display_find(id);
+ assert(vs);
return vnc_socket_local_addr("%s:%s", vs->lsock);
}