aboutsummaryrefslogtreecommitdiff
path: root/networking/telnetd.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-05-29 07:42:02 +0000
committerRob Landley <rob@landley.net>2006-05-29 07:42:02 +0000
commit1ec5b2905484b7904aabb01f56c70265fb538c82 (patch)
tree87292bfd7e99ce26b226518e244f4a96914397f9 /networking/telnetd.c
parenta6e131dab39ee67522687a56b39ed815b9ae15ec (diff)
downloadbusybox-1ec5b2905484b7904aabb01f56c70265fb538c82.tar.gz
More size shrinkage.
Diffstat (limited to 'networking/telnetd.c')
-rw-r--r--networking/telnetd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 5a11ffb8c..f2038395f 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -3,7 +3,7 @@
* Simple telnet server
* Bjorn Wesen, Axis Communications AB (bjornw@axis.com)
*
- * Licensed under GPL, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*
* ---------------------------------------------------------------------------
* (C) Copyright 2000, Axis Communications AB, LUND, SWEDEN
@@ -260,21 +260,17 @@ make_new_session(int sockfd)
struct termios termbuf;
int pty, pid;
char tty_name[32];
- struct tsession *ts = malloc(sizeof(struct tsession) + BUFSIZE * 2);
+ struct tsession *ts = xzalloc(sizeof(struct tsession) + BUFSIZE * 2);
ts->buf1 = (char *)(&ts[1]);
ts->buf2 = ts->buf1 + BUFSIZE;
#ifdef CONFIG_FEATURE_TELNETD_INETD
- ts->sockfd_read = 0;
ts->sockfd_write = 1;
#else /* CONFIG_FEATURE_TELNETD_INETD */
ts->sockfd = sockfd;
#endif /* CONFIG_FEATURE_TELNETD_INETD */
- ts->rdidx1 = ts->wridx1 = ts->size1 = 0;
- ts->rdidx2 = ts->wridx2 = ts->size2 = 0;
-
/* Got a new connection, set up a tty and spawn a shell. */
pty = getpty(tty_name);