vnc: Drop superfluous conditionals around g_strdup()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
master
Markus Armbruster 2014-06-06 18:47:44 +02:00 committed by Gerd Hoffmann
parent 64641d8764
commit c14e98479b
1 changed files with 1 additions and 4 deletions

View File

@ -3009,10 +3009,7 @@ int vnc_display_password(DisplayState *ds, const char *password)
}
g_free(vs->password);
vs->password = NULL;
if (password) {
vs->password = g_strdup(password);
}
vs->password = g_strdup(password);
return 0;
}