mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
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:
parent
0e7d6f6083
commit
9e0ff75e51
1 changed files with 1 additions and 0 deletions
1
ui/vnc.c
1
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue