summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2005-03-12 00:02:07 +0000
committerclaudio <claudio@openbsd.org>2005-03-12 00:02:07 +0000
commite75d4fce8ed3c2bb00409d38a6834b26e97ecc5e (patch)
treeab42c05d7508fbbf5f03b4ee1040f756fcc4cae5 /lib/libc/net
parentasprintf in place of strdup really is kind of lame (diff)
downloadwireguard-openbsd-e75d4fce8ed3c2bb00409d38a6834b26e97ecc5e.tar.xz
wireguard-openbsd-e75d4fce8ed3c2bb00409d38a6834b26e97ecc5e.zip
There is no need to call freeaddrinfo() in case of an error.
getaddrinfo() does that already by itself. OK jmc@ beck@
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/getaddrinfo.37
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index fd9f7fece59..b82dda59378 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getaddrinfo.3,v 1.39 2005/01/29 00:49:47 jmc Exp $
+.\" $OpenBSD: getaddrinfo.3,v 1.40 2005/03/12 00:02:07 claudio Exp $
.\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $
.\"
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@@ -279,6 +279,11 @@ structure created by a call to
returns zero on success or one of the error codes listed in
.Xr gai_strerror 3
if an error occurs.
+If an error occurs, no memory is allocated by
+.Fn getaddrinfo ,
+therefore it is not necessary to release the
+.Li addrinfo
+structure(s).
.Sh EXAMPLES
The following code tries to connect to
.Dq Li www.kame.net