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>
This commit is contained in:
Gerd Hoffmann 2015-02-11 17:33:33 +01:00
parent 0e7d6f6083
commit 9e0ff75e51

View File

@ -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);
}