Commit 3e9ae1b
authored
unix: remove handle from queue on uv_spawn() error (libuv#4980)
If uv_spawn() fails after uv__handle_init() has been called, the handle
remains in loop->handle_queue. This causes use-after-free if the handle
is stack-allocated or freed, and a subsequent loop operation like
uv_walk() accesses it.
This follows the same pattern as uv_tcp_init_ex() which explicitly
removes the handle from the queue on error.1 parent 309b28b commit 3e9ae1b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
| 1076 | + | |
1076 | 1077 | | |
1077 | 1078 | | |
1078 | 1079 | | |
| |||
0 commit comments