]> git.ipfire.org Git - thirdparty/curl.git/commit
async-thread: avoid closing eventfd twice
authorAndy Pan <i@andypan.me>
Thu, 12 Dec 2024 12:48:56 +0000 (12:48 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 12 Dec 2024 14:58:47 +0000 (15:58 +0100)
commitff5091aa9f73802e894b1cbdf24ab84e103200e2
tree5a46664b93a9d01254b82f3f76f52078ab3df318
parentaed732acb1252dcd096c295ef28391c99422d2fb
async-thread: avoid closing eventfd twice

When employing eventfd for socketpair, there is only one file
descriptor. Closing that fd twice might result in fd corruption.
Thus, we should avoid closing the eventfd twice, following the
pattern in lib/multi.c.

Fixes #15725
Closes #15727
Reported-by: Christian Heusel
lib/asyn-thread.c