diff options
author | brian <brian@FreeBSD.org> | 2000-07-20 09:05:15 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-07-20 09:05:15 +0000 |
commit | 145f71945d245c592d771bd0138510d7bcb43f1a (patch) | |
tree | 977d504c42072179b35113c243b77b58524acc88 /lib/libc/net/rcmd.3 | |
parent | 93bac0087e1506b7c834bf6c6d364194717b2ecd (diff) | |
download | FreeBSD-src-145f71945d245c592d771bd0138510d7bcb43f1a.zip FreeBSD-src-145f71945d245c592d771bd0138510d7bcb43f1a.tar.gz |
Alocate rcmd{,_af}()'s *ahost argument using malloc() (well
strdup()) rather than pointing it at something that's free()d
(via freeaddrinfo(res)) before the function returns.
I appreciate that this is an API change, but it's the only way
(AFAIK) of doing this without breaking existing code that uses
rcmd{,_af}().
Pointed out by: phkmalloc
Diffstat (limited to 'lib/libc/net/rcmd.3')
-rw-r--r-- | lib/libc/net/rcmd.3 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index 63f7fb5..7aa77e1 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -99,6 +99,10 @@ is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port .Fa inport . +It is up to the caller to free the memory associated with +.Fa *ahost +using +.Fn free . .Pp If the connection succeeds, a socket in the Internet domain of type @@ -264,6 +268,7 @@ is overloaded to mean ``All network ports in use.'' .Xr rlogin 1 , .Xr rsh 1 , .Xr intro 2 , +.Xr free 3 , .Xr rexec 3 , .Xr rexecd 8 , .Xr rlogind 8 , |