[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 25/46] usb: Pair g_malloc() with g_free(), not free()

From: Michael Tokarev
Subject: [Qemu-devel] [PULL 25/46] usb: Pair g_malloc() with g_free(), not free()
Date: Tue, 10 Feb 2015 09:34:14 +0300

From: Markus Armbruster <address@hidden>

Spotted by Coverity with preview checker ALLOC_FREE_MISMATCH enabled
and my "coverity: Model g_free() isn't necessarily free()" model patch

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
 hw/usb/desc-msos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c
index 334d1ae..32c3600 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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]