diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 32fe460f4155..2368d8235b2a 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -1185,7 +1185,7 @@ getanswer(answer, anslen, qname, qtype, template, errp) continue; } strcpy(bp, tbuf); - tname = bp; + template->h_name = bp; bp += n; buflen -= n; continue;