[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] vnc: fix coverity warning
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH] vnc: fix coverity warning |
Date: |
Wed, 11 Feb 2015 17:37:25 +0100 |
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 <address@hidden>
---
ui/vnc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index e291987..25ba340 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3252,6 +3252,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);
}
--
1.8.3.1
- [Qemu-devel] [PATCH] vnc: fix coverity warning,
Gerd Hoffmann <=