Skip to content

Commit

Permalink
vnc: fix coverity warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kraxel committed Feb 16, 2015
1 parent 0e7d6f6 commit 9e0ff75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/vnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9e0ff75

Please sign in to comment.