Skip to content

Commit 06c2ddc

Browse files
authored
set res to NULL
1 parent 1041701 commit 06c2ddc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/getaddrinfo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,9 @@ getaddrinfo(const char*hostname, const char*servname,
351351
struct servent *sp;
352352
const char *proto;
353353

354-
if (ai->ai_flags & AI_NUMERICSERV)
355-
return EAI_NONAME;
354+
if (ai->ai_flags & AI_NUMERICSERV) {
355+
ERR(EAI_NONAME);
356+
}
356357

357358
proto = NULL;
358359
switch (pai->ai_socktype) {

0 commit comments

Comments
 (0)