summaryrefslogtreecommitdiff
path: root/lib/libc/net/freeaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/freeaddrinfo.c')
-rw-r--r--lib/libc/net/freeaddrinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/net/freeaddrinfo.c b/lib/libc/net/freeaddrinfo.c
index cdabe14d095..40534f44224 100644
--- a/lib/libc/net/freeaddrinfo.c
+++ b/lib/libc/net/freeaddrinfo.c
@@ -42,6 +42,8 @@ freeaddrinfo(ai)
while (ai) {
p = ai;
ai = ai->ai_next;
+ if (p->ai_canonname)
+ free(p->ai_canonname);
free((void *)p);
}
}