Message ID | 1422456844-13043-5-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
On 2015/1/28 22:54, Markus Armbruster wrote: > 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> > --- > 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; This patch had been added Gerd's usb queue :) http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg01998.html Regards, -Gonglei
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;
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> --- hw/usb/desc-msos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)