| 
      
      
      From: Stephan M. <ste...@we...> - 2006-08-24 17:17:51
      
     | 
| 
Thanks for the patch. I've just applied it to the CVS version.
Stephan
> Adam Kropelin wrote:
> > On Wed, Aug 23, 2006 at 04:11:55PM +0100, Dan Ellis wrote:
> >> There's a small memory leak in usb=5Fcontrol=5Fmsg, in the case that
> >> usb=5Fio=5Fsync fails and it's an OUT, then the malloced block doesn't
> >> get freed:
> >=20
> > Hi, Dan,
> >=20
> > Thanks for posting about this bug and others. Have you considered
> > posting patches to fix the bugs=3F That way myself and other users
> > could try them out and Stephan, who I am sure is very busy, could
> > review and apply the changes without having to implement them.  =20
>=20
> Good idea, here are the fixes for the memory leak and the corruption.
> The diff :
>=20
> Index: src/windows.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- windows.c	2006/08/08 16:16:03	1.52
> +++ windows.c	2006/08/20 17:00:38	(working copy)
> @@ -784,6 +784,11 @@
>      {
>        usb=5Ferror("usb=5Fcontrol=5Fmsg: sending control message failed, "
>                  "win error: %s", usb=5Fwin=5Ferror=5Fto=5Fstring());
> +     =20
> +      if(!(requesttype & USB=5FENDPOINT=5FIN))
> +	{
> +	free(out);
> +	}
>        return -usb=5Fwin=5Ferror=5Fto=5Ferrno();
>      }
> =20
> @@ -1102,6 +1107,7 @@
>            free(bus->root=5Fdev->children);
>          }
> =20
> +      bus->root=5Fdev->num=5Fchildren =3D 0;
>        for(dev =3D bus->devices; dev; dev =3D dev->next)
>          bus->root=5Fdev->num=5Fchildren++;
> =20
>=20
> ------------------------------------------------------------------------=
-
> Using Tomcat but need to do more=3F Need to support web services, security=
=3F
> Get stuff done quickly with pre-integrated technology to make your job e=
asier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni=
mo
> http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642=
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach!	=09
Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131
 |