summaryrefslogtreecommitdiff
path: root/ext/socket/raddrinfo.c
diff options
context:
space:
mode:
authorMisaki Shioi <[email protected]>2024-11-17 10:36:33 +0900
committerGitHub <[email protected]>2024-11-17 10:36:33 +0900
commit3c30af77fea37a10b95a3fc322ff20d7086cab5f (patch)
treec29dd8abe2dc3695687d0195b8e8b5f00608bea2 /ext/socket/raddrinfo.c
parentbc409f3fe3fab2e540f8630aced0655be68dfac3 (diff)
Fix stack-use-after-return (#12105)
http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5409001 ``` ================================================================= ==3263562==ERROR: AddressSanitizer: stack-use-after-return on address 0x735a8f190da8 at pc 0x735a6f58dabc bp 0x735a639ffd10 sp 0x735a639ffd08 READ of size 4 at 0x735a8f190da8 thread T211 ================================================================= ```
Notes
Notes: Merged-By: shioimm <[email protected]>
Diffstat (limited to 'ext/socket/raddrinfo.c')
-rw-r--r--ext/socket/raddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 6f81937604..e18e7ca699 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -3093,7 +3093,7 @@ do_fast_fallback_getaddrinfo(void *ptr)
rb_nativethread_lock_lock(shared->lock);
{
entry->err = err;
- if (*shared->cancelled) {
+ if (shared->cancelled) {
if (entry->ai) {
freeaddrinfo(entry->ai);
entry->ai = NULL;