freebsd-src/lib/libusb
Baptiste Daroussin eb9fa4c2d7 libusb: fix hotplug sigbus
When a hotplug callback has been registered, and the program using
libusb is calling libusb_exit then the thread handler is set to
NO_THREAD which result in the variable controlling the loop the be set
to 0, it does a last pass through device available without having done
a scan, which result in a sigbus after it tried to unregister all the
devices.

directly break the loop instead and cleanup the list of devices

this fixes the tests with LGPLed libusb's hotplugtest program

MFC After:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D48298

(cherry picked from commit ba5834b8e1)
2025-01-07 10:03:21 +01:00
..
libusb-0.1.pc Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
libusb-1.0.pc libusb: claim to be version 1.0.16 2024-08-06 17:52:37 -04:00
libusb-2.0.pc Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
libusb.3 Remove $FreeBSD$: two-line nroff pattern 2023-08-23 11:43:31 -06:00
libusb.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb01.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb10.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb10.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb10_desc.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb10_hotplug.c libusb: fix hotplug sigbus 2025-01-07 10:03:21 +01:00
libusb10_io.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20.3 Remove $FreeBSD$: two-line nroff pattern 2023-08-23 11:43:31 -06:00
libusb20.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20_desc.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20_desc.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20_int.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb20_ugen20.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
libusb_global_linux.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
usb.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00