From: Stefan Weil Date: Mon, 14 Dec 2009 09:39:12 +0000 (+0100) Subject: s390: Fix buggy assignment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5a2b3fc5aaae48859e09a8d96f4f92578b060892;p=qemu.git s390: Fix buggy assignment nd->model keeps dynamically allocated model names. So casting of a constant string is wrong here. Signed-off-by: Stefan Weil Acked-by: Alexander Graf Signed-off-by: Aurelien Jarno --- diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index b56788652e..b57fa9c2f8 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -209,7 +209,7 @@ static void s390_init(ram_addr_t ram_size, DeviceState *dev; if (!nd->model) { - nd->model = (char*)"virtio"; + nd->model = qemu_strdup("virtio"); } if (strcmp(nd->model, "virtio")) {