summaryrefslogtreecommitdiff
path: root/hw/usb/desc-msos.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-01-28 15:54:04 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commit0c6f807f4a98e7e258765dcf22619a582995fce0 (patch)
tree41a1d065c3a997f90a56d5ef279b0cf43132db40 /hw/usb/desc-msos.c
parent5f1d1fc5928a6f8f63089b3d0768e0dc42c05fbb (diff)
downloadqemu-0c6f807f4a98e7e258765dcf22619a582995fce0.zip
usb: Pair g_malloc() with g_free(), not free()
Spotted by Coverity with preview checker ALLOC_FREE_MISMATCH enabled and my "coverity: Model g_free() isn't necessarily free()" model patch applied. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/usb/desc-msos.c')
-rw-r--r--hw/usb/desc-msos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c
index 334d1aea8d..32c3600df8 100644
--- a/hw/usb/desc-msos.c
+++ b/hw/usb/desc-msos.c
@@ -231,7 +231,7 @@ int usb_desc_msos(const USBDesc *desc, USBPacket *p,
length = len;
}
memcpy(dest, buf, length);
- free(buf);
+ g_free(buf);
p->actual_length = length;
return 0;