提交 b0302863 编写于 作者: R Rich Felker

fix memory leak due to double call to getaddrinfo in gethostbyname*

上级 70b584bc
......@@ -30,7 +30,6 @@ int gethostbyname2_r(const char *name, int af,
buflen -= sizeof(char *)-i;
}
getaddrinfo(name, 0, &hint, &ai);
switch (getaddrinfo(name, 0, &hint, &ai)) {
case EAI_NONAME:
*err = HOST_NOT_FOUND;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册