Fix dangling else

This commit is contained in:
Nobuyoshi Nakada 2024-06-23 09:42:25 +09:00
parent fba8aff7af
commit d8c6e91748
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -277,8 +277,9 @@ numeric_getaddrinfo(const char *node, const char *service,
void
rb_freeaddrinfo(struct rb_addrinfo *ai)
{
if (!ai->allocated_by_malloc)
if (!ai->allocated_by_malloc) {
if (ai->ai) freeaddrinfo(ai->ai);
}
else {
struct addrinfo *ai1, *ai2;
ai1 = ai->ai;