Skip to content
Snippets Groups Projects
Commit 9ef61724 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

usb: free leaking path


qdev_get_dev_path() returns an allocated string, free it when no longer
needed.

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent ec507f11
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment