From b0aa9d31f297caa3ee645c1a56eeb7a109f3d79c Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Thu, 7 Nov 2024 09:53:33 +0100 Subject: [PATCH] qemu: Avoid useless tmp variable in qemuCanonicalizeMachine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_postparse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c index 11134fb030..03b5ef825a 100644 --- a/src/qemu/qemu_postparse.c +++ b/src/qemu/qemu_postparse.c @@ -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;