[Nut-upsdev] Small memory leak in libusb.c
Schmier, Jacob
Jacob_Schmier at inter-tel.com
Thu Feb 15 20:54:33 CET 2007
I noticed a small ( < 1k ) memory leak in libusb.c's libusb_open. When
retrieving the descriptor information, strdup is used to set the
Vendor/Product/Serial strings for the current device. The memory
allocated by strdup is not deallocated in subsequent iterations of the
loop. The leak is quite small and really isn't a huge problem. I
believe that the attached patch should correct this.
Jacob Schmier
The information contained in this E-mail may be confidential and/or proprietary to Inter-Tel and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libusb-leak.pat
Type: application/octet-stream
Size: 585 bytes
Desc: libusb-leak.pat
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070215/232defc0/libusb-leak.obj
More information about the Nut-upsdev
mailing list