diff options
author | Kevin Wolf <kwolf@redhat.com> | 2025-06-25 10:27:51 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2025-06-26 00:42:28 +0200 |
commit | 78e3781541209b3dcd6f4bb66adf3a3e504b88a4 (patch) | |
tree | 55530ceb71b6d49a53341804afd3b7f2214c16e7 | |
parent | a96011fefc2d9073569d51f481b656b65f552df7 (diff) | |
download | qemu-78e3781541209b3dcd6f4bb66adf3a3e504b88a4.zip qemu-78e3781541209b3dcd6f4bb66adf3a3e504b88a4.tar.gz qemu-78e3781541209b3dcd6f4bb66adf3a3e504b88a4.tar.bz2 |
hw/s390x/ccw-device: Fix memory leak in loadparm setter
Commit bdf12f2a fixed the setter for the "loadparm" machine property,
which gets a string from a visitor, passes it to s390_ipl_fmt_loadparm()
and then forgot to free it. It left another instance of the same problem
unfixed in the "loadparm" device property. Fix it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20250625082751.24896-1-kwolf@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r-- | hw/s390x/ccw-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index 19c2238..8be1813 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -57,7 +57,7 @@ static void ccw_device_set_loadparm(Object *obj, Visitor *v, Error **errp) { CcwDevice *dev = CCW_DEVICE(obj); - char *val; + g_autofree char *val = NULL; int index; index = object_property_get_int(obj, "bootindex", NULL); |