aboutsummaryrefslogtreecommitdiff
path: root/lib/telnet.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-18 20:24:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-18 20:24:20 +0000
commit83b82e4472f94cc3f5f9972a846f820900a45ef0 (patch)
tree4956758f5e803451278a9a3cc6e95a38a39a8ba7 /lib/telnet.c
parent65dab79ca58cd95dc8741399a6ed7b8c21c606d3 (diff)
memory leak
Diffstat (limited to 'lib/telnet.c')
-rw-r--r--lib/telnet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/telnet.c b/lib/telnet.c
index d01ae25bb..64715b0dd 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -753,8 +753,7 @@ static int check_telnet_options(struct connectdata *conn)
was given on the command line */
if(conn->bits.user_passwd)
{
- char *buf = malloc(256);
- sprintf(buf, "USER,%s", conn->user);
+ snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user);
tn->telnet_vars = curl_slist_append(tn->telnet_vars, buf);
tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;