getcanonname: Fix a typo
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 5 Sep 2023 21:04:05 +0000 (17:04 -0400)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 5 Sep 2023 21:04:05 +0000 (17:04 -0400)
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>
sysdeps/posix/getaddrinfo.c

index 0356b62..d17b97d 100644 (file)
@@ -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