From: Marc-André Lureau Date: Fri, 15 Jul 2016 09:48:13 +0000 (+0200) Subject: usb: free leaking path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9ef617246b629109e2779835b9a3a8400029484d;p=qemu.git usb: free leaking path qdev_get_dev_path() returns an allocated string, free it when no longer needed. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann --- diff --git a/hw/usb/desc.c b/hw/usb/desc.c index adb026e43b..5e0e1d157e 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -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)