mirror of
https://github.com/ruby/ruby.git
synced 2026-08-12 08:20:37 +08:00
Fix reading freed memory in rb_getaddrinfo
This commit is contained in:
parent
8f8dd01a93
commit
8601f5a42e
@ -601,13 +601,9 @@ start:
|
||||
if (need_free) free_getaddrinfo_arg(arg);
|
||||
|
||||
if (timedout) {
|
||||
if (arg->ai) {
|
||||
rsock_raise_user_specified_timeout(arg->ai, Qnil, Qnil);
|
||||
} else {
|
||||
VALUE host = rb_str_new_cstr(hostp);
|
||||
VALUE port = rb_str_new_cstr(portp);
|
||||
rsock_raise_user_specified_timeout(NULL, host, port);
|
||||
}
|
||||
VALUE host = rb_str_new_cstr(hostp);
|
||||
VALUE port = rb_str_new_cstr(portp);
|
||||
rsock_raise_user_specified_timeout(NULL, host, port);
|
||||
}
|
||||
|
||||
// If the current thread is interrupted by asynchronous exception, the following raises the exception.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user