| 
      
      
      From: Stephan M. <ste...@we...> - 2006-07-31 17:17:43
      
     | 
| 
I fixed the memory leak in usb_os_determine_children() (file windows.c)
and another one in usb_find_busses() (file usb.c) by including the latest
files from the (linux-) libusb project.
The new files are in the CVS.
I tested the functions with the following code:
int main(void)
{
  usb_init();
  usb_set_debug(255);
  while(1) {
    usb_find_busses();
    usb_find_devices();
  }
}
Everything seems to be ok now.
Stephan
> Hi,
> 
> We've detected a memory leak which seems to have crept into libusb not
> long ago. It looks like it's in usb_os_determine_children which used to
> have an empty body, but now does some mallocs. I can't see where these
> are ever freed, so if you call usb_find_devices more than once you get a
> memory leak. Is this correct?
> 
> I also can't see how buses are successfully freed upon discovery that
> they are no longer there, but this is a very rare occurrence, whereas
> scanning the bus for new devices happens quite often.
> 
> Dan Ellis
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
 |