qemu: Avoid useless tmp variable in qemuCanonicalizeMachine

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Jiri Denemark 2024-11-07 09:53:33 +01:00
parent 5904676d2f
commit b0aa9d31f2

View File

@ -947,10 +947,8 @@ qemuCanonicalizeMachine(virDomainDef *def, virQEMUCaps *qemuCaps)
return 0;
if (STRNEQ(canon, def->os.machine)) {
char *tmp;
tmp = g_strdup(canon);
VIR_FREE(def->os.machine);
def->os.machine = tmp;
def->os.machine = g_strdup(canon);
}
return 0;