Coverity points out that there is memory leak because name is never freed after use in nubus_device_realize().
Fixes: Coverity CID 1464062 Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> --- hw/nubus/nubus-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nubus/nubus-device.c b/hw/nubus/nubus-device.c index 0f1852f671..64f837e44d 100644 --- a/hw/nubus/nubus-device.c +++ b/hw/nubus/nubus-device.c @@ -78,6 +78,7 @@ static void nubus_device_realize(DeviceState *dev, Error **errp) name = g_strdup_printf("nubus-slot-%x-declaration-rom", nd->slot); memory_region_init_rom(&nd->decl_rom, OBJECT(dev), name, size, &error_abort); + g_free(name); ret = load_image_mr(path, &nd->decl_rom); g_free(path); if (ret < 0) { -- 2.20.1