virt_viewer_session_vnc_auth_credential uses gotos which jump over the declaration of 'file', meaning its contents are uninitialized in the jump target. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- src/virt-viewer-session-vnc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-session-vnc.c index e7c8cad..31d5361 100644 --- a/src/virt-viewer-session-vnc.c +++ b/src/virt-viewer-session-vnc.c @@ -273,6 +273,7 @@ virt_viewer_session_vnc_auth_credential(GtkWidget *src G_GNUC_UNUSED, VirtViewerSessionVnc *self = VIRT_VIEWER_SESSION_VNC(session); char *username = NULL, *password = NULL; gboolean wantPassword = FALSE, wantUsername = FALSE; + VirtViewerFile *file = NULL; int i; g_debug("Got VNC credential request for %u credential(s)", credList->n_values); @@ -295,7 +296,7 @@ virt_viewer_session_vnc_auth_credential(GtkWidget *src G_GNUC_UNUSED, } } - VirtViewerFile *file = virt_viewer_session_get_file(VIRT_VIEWER_SESSION(self)); + file = virt_viewer_session_get_file(VIRT_VIEWER_SESSION(self)); if (file != NULL) { if (wantUsername) { if (virt_viewer_file_is_set(file, "username")) { -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list