summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-03-12 00:02:08 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-03-12 00:02:08 +0000
commiteab8755c854d3ba03f4ae9a16301413b776741e0 (patch)
treeafde349e3c1fe39b744b4c7c9daa94d29a195dc8 /lib
parent49ac8ff21dee422ae25a16185c560aa3faa910b3 (diff)
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')
-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