1 diff --git a/hw/acpi/core.c b/hw/acpi/core.c
2 index 1e004d0078..3e811bf03c 100644
5 @@ -345,8 +345,8 @@ int acpi_get_slic_oem(AcpiSlicOem *oem)
6 struct acpi_table_header *hdr = (void *)(u - sizeof(hdr->_length));
8 if (memcmp(hdr->sig, "SLIC", 4) == 0) {
9 - oem->id = hdr->oem_id;
10 - oem->table_id = hdr->oem_table_id;
11 + oem->id = g_strndup(hdr->oem_id, 6);
12 + oem->table_id = g_strndup(hdr->oem_table_id, 8);
16 diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
17 index a99c6e4fe3..570f82997b 100644
18 --- a/hw/i386/acpi-build.c
19 +++ b/hw/i386/acpi-build.c
20 @@ -2721,6 +2721,8 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
22 /* Cleanup memory that's no longer used. */
23 g_array_free(table_offsets, true);
24 + g_free(slic_oem.id);
25 + g_free(slic_oem.table_id);
28 static void acpi_ram_update(MemoryRegion *mr, GArray *data)