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 | 7614114e903cf6fe485772c3432ccc36568e8ab3 (patch) | |
tree | 90b2b513084a49ff878d33d92e11cc4e9fccfce2 /hw | |
parent | ef2ece4a87f430067b2a6356afc3e32c2beafa97 (diff) | |
download | qemu-7614114e903cf6fe485772c3432ccc36568e8ab3.zip qemu-7614114e903cf6fe485772c3432ccc36568e8ab3.tar.gz qemu-7614114e903cf6fe485772c3432ccc36568e8ab3.tar.bz2 |
hw/ppc/spapr_drc.c: use g_autofree in spapr_dr_connector_new()
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220228175004.8862-10-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_drc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index b2a365b..ac40676 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -557,7 +557,7 @@ SpaprDrc *spapr_dr_connector_new(Object *owner, const char *type, uint32_t id) { SpaprDrc *drc = SPAPR_DR_CONNECTOR(object_new(type)); - char *prop_name; + g_autofree char *prop_name = NULL; drc->id = id; drc->owner = owner; @@ -566,7 +566,6 @@ SpaprDrc *spapr_dr_connector_new(Object *owner, const char *type, object_property_add_child(owner, prop_name, OBJECT(drc)); object_unref(OBJECT(drc)); qdev_realize(DEVICE(drc), NULL, NULL); - g_free(prop_name); return drc; } |