Skip to content

Commit b8f48f4

Browse files
kevmwMichael Tokarev
authored andcommitted
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 <[email protected]> Message-ID: <[email protected]> Reviewed-by: Eric Farman <[email protected]> Reviewed-by: Halil Pasic <[email protected]> Tested-by: Thomas Huth <[email protected]> Signed-off-by: Thomas Huth <[email protected]> (cherry picked from commit 78e3781541209b3dcd6f4bb66adf3a3e504b88a4) (Mjt: bdf12f2a is 8efe159 in stable-10.0 branch) Signed-off-by: Michael Tokarev <[email protected]>
1 parent fb9bad3 commit b8f48f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/s390x/ccw-device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void ccw_device_set_loadparm(Object *obj, Visitor *v,
5757
Error **errp)
5858
{
5959
CcwDevice *dev = CCW_DEVICE(obj);
60-
char *val;
60+
g_autofree char *val = NULL;
6161
int index;
6262

6363
index = object_property_get_int(obj, "bootindex", NULL);

0 commit comments

Comments
 (0)