mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix crash in TCPSocket.open
Fix segfault crash observable with TCPSocket.open(nil, nil)
This commit is contained in:
parent
e580145171
commit
7e093fb43a
1 changed files with 1 additions and 1 deletions
|
@ -593,7 +593,7 @@ init_fast_fallback_inetsock_internal(VALUE v)
|
|||
arg->getaddrinfo_shared->notify = hostname_resolution_notifier;
|
||||
|
||||
arg->getaddrinfo_shared->node = arg->hostp ? ruby_strdup(arg->hostp) : NULL;
|
||||
arg->getaddrinfo_shared->service = ruby_strdup(arg->portp);
|
||||
arg->getaddrinfo_shared->service = arg->portp ? ruby_strdup(arg->portp) : NULL;
|
||||
arg->getaddrinfo_shared->refcount = arg->family_size + 1;
|
||||
|
||||
for (int i = 0; i < arg->family_size; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue