diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-03-02 06:51:39 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-03-02 06:51:39 +0100 |
commit | ef2ece4a87f430067b2a6356afc3e32c2beafa97 (patch) | |
tree | f40d6afb91afb081764d725432c60d5bd5c1cf8e /hw/ppc | |
parent | 37deca77a6dbcd8bfca6e08af7c39e021ca93b88 (diff) | |
download | qemu-ef2ece4a87f430067b2a6356afc3e32c2beafa97.zip qemu-ef2ece4a87f430067b2a6356afc3e32c2beafa97.tar.gz qemu-ef2ece4a87f430067b2a6356afc3e32c2beafa97.tar.bz2 |
hw/ppc/spapr_drc.c: use g_autofree in drc_unrealize()
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220228175004.8862-9-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr_drc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 251201f..b2a365b 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -544,15 +544,13 @@ static void drc_realize(DeviceState *d, Error **errp) static void drc_unrealize(DeviceState *d) { SpaprDrc *drc = SPAPR_DR_CONNECTOR(d); + g_autofree gchar *name = g_strdup_printf("%x", spapr_drc_index(drc)); Object *root_container; - gchar *name; trace_spapr_drc_unrealize(spapr_drc_index(drc)); vmstate_unregister(VMSTATE_IF(drc), &vmstate_spapr_drc, drc); root_container = container_get(object_get_root(), DRC_CONTAINER_PATH); - name = g_strdup_printf("%x", spapr_drc_index(drc)); object_property_del(root_container, name); - g_free(name); } SpaprDrc *spapr_dr_connector_new(Object *owner, const char *type, |