projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec507f1
)
usb: free leaking path
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Fri, 15 Jul 2016 09:48:13 +0000
(11:48 +0200)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Sun, 7 Aug 2016 20:00:36 +0000
(
00:00
+0400)
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>
hw/usb/desc.c
patch
|
blob
|
history
diff --git
a/hw/usb/desc.c
b/hw/usb/desc.c
index adb026e43b953c35b4603a471edd6518943ccf11..5e0e1d157e3928c2d25b59b50f94834a1cf53bfe 100644
(file)
--- 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)