Ticket #130 (assigned defect)

Opened 13 months ago

Last modified 12 days ago

libusb-compat-0.1 does not call libusb_exit()

Reported by: xiaofan Owned by: stuge
Milestone: libusb-compat 0.1.5 Component: libusb-compat-0.1
Keywords: libusb-compat Cc:
Blocked By: Blocks:

Description

There is a potential problem in the libusb-compat layer because libusb-1.0
requires a call to libusb_exit(). However, libusb_exit() is never called by the
compat layer even though libusb_init() is used.
http://git.libusb.org/?p=libusb-compat-0.1.git;a=blob;f=libusb/core.c;js=1

Also ref here which shows that libusb_exit() is really necessary.
http://libusb.6.n5.nabble.com/quot-memory-leak-quot-debug-message-after-libusb-close-and-upon-application-exit-td5581475.html

Attachments

0002-use-atexit-to-call-libusb_exit.patch (1.1 KB) - added by hjelmn 7 weeks ago.
0002-use-atexit-to-call-libusb_exit.2.patch (1.1 KB) - added by hjelmn 7 weeks ago.

Download all attachments as: .zip

Change History

comment:1 Changed 12 months ago by stuge

I'm not sure that this ticket can be fixed. The 0.1 API doesn't have an exit call.

Changed 7 weeks ago by hjelmn

Changed 7 weeks ago by hjelmn

comment:2 Changed 7 weeks ago by hjelmn

  • Owner set to stuge
  • Status changed from new to assigned

Peter, can you take a look at the attached patch and let me know what you think? atexit is an ANSI-C standard call and should be available on all supported platforms.

comment:4 Changed 12 days ago by hjelmn

  • Milestone set to libusb-compat 0.1.5
Note: See TracTickets for help on using tickets.