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