about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2023-09-05 17:04:05 -0400
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-09-05 17:04:05 -0400
commit3bf7bab88b0da01d4f5ef20afbbb45203185501e (patch)
treea6b15659ff7c5458b2f3a0cc153450712e9c282d
parente7190fc73dbc8a1f8f94f8ccacd9a190fa5e609c (diff)
downloadglibc-3bf7bab88b0da01d4f5ef20afbbb45203185501e.tar.gz
glibc-3bf7bab88b0da01d4f5ef20afbbb45203185501e.tar.xz
glibc-3bf7bab88b0da01d4f5ef20afbbb45203185501e.zip
getcanonname: Fix a typo
This code is generally unused in practice since there don't seem to be
any NSS modules that only implement _nss_MOD_gethostbyname2_r and not
_nss_MOD_gethostbyname3_r.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 0356b622be..d17b97d79a 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -337,7 +337,7 @@ getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name)
 	   string.  */
 	s = (char *) name;
     }
-  return __strdup (name);
+  return __strdup (s);
 }
 
 /* Process looked up canonical name and if necessary, decode to IDNA.  Result