memory leak

This commit is contained in:
Daniel Stenberg 2003-10-18 20:24:20 +00:00
parent 65dab79ca5
commit 83b82e4472

View File

@ -753,8 +753,7 @@ static int check_telnet_options(struct connectdata *conn)
was given on the command line */ was given on the command line */
if(conn->bits.user_passwd) if(conn->bits.user_passwd)
{ {
char *buf = malloc(256); snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user);
sprintf(buf, "USER,%s", conn->user);
tn->telnet_vars = curl_slist_append(tn->telnet_vars, buf); tn->telnet_vars = curl_slist_append(tn->telnet_vars, buf);
tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES; tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;