projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f1d1fc
)
usb: Pair g_malloc() with g_free(), not free()
author
Markus Armbruster
<armbru@redhat.com>
Wed, 28 Jan 2015 14:54:04 +0000
(15:54 +0100)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000
(09:27 +0300)
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>
hw/usb/desc-msos.c
patch
|
blob
|
history
diff --git
a/hw/usb/desc-msos.c
b/hw/usb/desc-msos.c
index
334d1ae
..
32c3600
100644
(file)
--- 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;