提交 0c6f807f 编写于 作者: M Markus Armbruster 提交者: Michael Tokarev

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: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 5f1d1fc5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册