mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Michael Tokarev
parent
5f1d1fc592
commit
0c6f807f4a
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user