mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue