mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
usb: free leaking path
qdev_get_dev_path() returns an allocated string, free it when no longer needed. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
ec507f1123
commit
9ef617246b
@ -574,6 +574,7 @@ void usb_desc_create_serial(USBDevice *dev)
|
||||
}
|
||||
dst += snprintf(serial+dst, sizeof(serial)-dst, "-%s", dev->port->path);
|
||||
usb_desc_set_string(dev, index, serial);
|
||||
g_free(path);
|
||||
}
|
||||
|
||||
const char *usb_desc_get_string(USBDevice *dev, uint8_t index)
|
||||
|
Loading…
Reference in New Issue
Block a user