From 3bf7bab88b0da01d4f5ef20afbbb45203185501e Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 5 Sep 2023 17:04:05 -0400 Subject: [PATCH] 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 --- sysdeps/posix/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 0356b62..d17b97d 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 -- 2.7.4