fix possible double free when requests get aborted

This commit is contained in:
ading2210 2024-07-10 23:52:11 -07:00
parent 11795d2772
commit 31e4e25f82
7 changed files with 41 additions and 8 deletions

View file

@ -166,6 +166,8 @@ class CurlSession {
}
catch (e) {
//the readable stream has been closed elsewhere, so cancel the request
if (aborted) return;
aborted = true;
if (e instanceof TypeError) {
end_callback(-1);
}