aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-07-15 11:48:13 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2016-08-08 00:00:36 +0400
commit9ef617246b629109e2779835b9a3a8400029484d (patch)
tree3669af134b5216317d8cddb7ea3e46243f255157 /hw/usb
parentec507f112361ddf6dac0f0a30e84d9da1b4910b6 (diff)
downloadqemu-9ef617246b629109e2779835b9a3a8400029484d.zip
qemu-9ef617246b629109e2779835b9a3a8400029484d.tar.gz
qemu-9ef617246b629109e2779835b9a3a8400029484d.tar.bz2
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>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/desc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/desc.c b/hw/usb/desc.c
index adb026e..5e0e1d1 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)