From 9e0ff75e5158c7dbb65ee447382bbdf4cafbef8b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 11 Feb 2015 17:33:33 +0100 Subject: 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 --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') 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); } -- cgit v1.1