mirror of git://sourceware.org/git/glibc.git
* sysdeps/posix/getaddrinfo.c (gaih_inet): No need to duplicate
'name' for 'canon'. The final allocation will happen later.
This commit is contained in:
parent
cd277b2d03
commit
5b353be3b6
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-03-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/posix/getaddrinfo.c (gaih_inet): No need to duplicate
|
||||||
|
'name' for 'canon'. The final allocation will happen later.
|
||||||
|
|
||||||
2006-03-27 Ulrich Drepper <drepper@redhat.com>
|
2006-03-27 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/kernel-features.h: Remove support for
|
* sysdeps/unix/sysv/linux/kernel-features.h: Remove support for
|
||||||
|
|
|
||||||
|
|
@ -538,16 +538,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
||||||
else
|
else
|
||||||
return -EAI_ADDRFAMILY;
|
return -EAI_ADDRFAMILY;
|
||||||
|
|
||||||
dupname:
|
|
||||||
if (req->ai_flags & AI_CANONNAME)
|
if (req->ai_flags & AI_CANONNAME)
|
||||||
{
|
canon = name;
|
||||||
canon = strdup (name);
|
|
||||||
if (canon == NULL)
|
|
||||||
return -EAI_MEMORY;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (at->family == AF_UNSPEC)
|
||||||
if (at->family == AF_UNSPEC)
|
|
||||||
{
|
{
|
||||||
char *namebuf = (char *) name;
|
char *namebuf = (char *) name;
|
||||||
char *scope_delim = strchr (name, SCOPE_DELIMITER);
|
char *scope_delim = strchr (name, SCOPE_DELIMITER);
|
||||||
|
|
@ -595,7 +589,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goto dupname;
|
if (req->ai_flags & AI_CANONNAME)
|
||||||
|
canon = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue