summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-06-28 00:52:26 +0000
committermillert <millert@openbsd.org>2002-06-28 00:52:26 +0000
commita5aff99b0fd748dc603cd19ee835939b409952d7 (patch)
tree41cab701ff5f069a417563f3f67b9c6701f37120
parentnot used by new ahc driver (diff)
downloadwireguard-openbsd-a5aff99b0fd748dc603cd19ee835939b409952d7.tar.xz
wireguard-openbsd-a5aff99b0fd748dc603cd19ee835939b409952d7.zip
When gettytab doesn't exist, IM contains a #defined string so don't
try to free() it in that case.
-rw-r--r--libexec/telnetd/telnetd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index 71e78ca16bd..649d32a2b07 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -978,7 +978,7 @@ my_telnet(int f, int p, const char *host, const char *utmp_host,
free(he);
if (hostinfo && *IM)
putf(IM, ptyibuf2);
- if (*IM)
+ if (IM != DEFAULT_IM && *IM)
free(IM);
if (pcc)