diff options
| author | 2023-12-14 01:16:00 +0100 | |
|---|---|---|
| committer | 2025-09-06 20:07:05 +0200 | |
| commit | 5506512dae682f733c55f59d9802a0ff12369822 (patch) | |
| tree | 399c97b08b59fb74cf300647bb510853974d9737 /src | |
| parent | 7a84cd9f639a1962d5e73118263a1b2fbab52b14 (diff) | |
| download | libirecovery-5506512dae682f733c55f59d9802a0ff12369822.tar.gz libirecovery-5506512dae682f733c55f59d9802a0ff12369822.tar.bz2 | |
IOKit: Fix race condition when trying to delete runloop before it even started
Diffstat (limited to 'src')
| -rw-r--r-- | src/libirecovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 3146e40..a38b55f 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -3114,6 +3114,7 @@ irecv_error_t irecv_device_event_unsubscribe(irecv_device_event_context_t contex | |||
| 3114 | if (num == 0 && th_event_handler != THREAD_T_NULL && thread_alive(th_event_handler)) { | 3114 | if (num == 0 && th_event_handler != THREAD_T_NULL && thread_alive(th_event_handler)) { |
| 3115 | #ifdef HAVE_IOKIT | 3115 | #ifdef HAVE_IOKIT |
| 3116 | if (iokit_runloop) { | 3116 | if (iokit_runloop) { |
| 3117 | while (!CFRunLoopIsWaiting(iokit_runloop)) usleep(420); | ||
| 3117 | CFRunLoopStop(iokit_runloop); | 3118 | CFRunLoopStop(iokit_runloop); |
| 3118 | iokit_runloop = NULL; | 3119 | iokit_runloop = NULL; |
| 3119 | } | 3120 | } |
