From eab8755c854d3ba03f4ae9a16301413b776741e0 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sat, 12 Mar 2005 00:02:08 +0000 Subject: There is no need to call freeaddrinfo() in case of an error. getaddrinfo() does that already by itself. OK jmc@ beck@ --- lib/libc/net/getaddrinfo.3 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3