From 0c6f807f4a98e7e258765dcf22619a582995fce0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 28 Jan 2015 15:54:04 +0100 Subject: 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 Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/usb/desc-msos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/usb/desc-msos.c') 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; -- cgit v1.2.3