]> git.ipfire.org Git - thirdparty/curl.git/commit
asny-thrdd: fix detach from running thread
authorStefan Eissing <stefan@eissing.org>
Mon, 12 May 2025 08:08:21 +0000 (10:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 May 2025 15:17:19 +0000 (17:17 +0200)
commit2e1040fa5ce6c02f2ccedb2b29cda381ccd849c1
treea4f0bf901cceb3beefeac16884d5eba2a2640a54
parentcf511e7726a17e02f9730ee14058ddc92afaa1a5
asny-thrdd: fix detach from running thread

When cancelling a threaded resolve and the thread is
still running, detach from it under the mutex lock.

Otherwise, the detach might happen after the thread finished
and access already freed memory.

Fixes #17256
Reported-by: Mathieu Garaud
Closes #17320
lib/asyn-thrdd.c