summaryrefslogtreecommitdiffstats
path: root/src/appl/gssftp/ftp/ruserpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/appl/gssftp/ftp/ruserpass.c')
-rw-r--r--src/appl/gssftp/ftp/ruserpass.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/appl/gssftp/ftp/ruserpass.c b/src/appl/gssftp/ftp/ruserpass.c
index acfabfa2da..3495dda4e5 100644
--- a/src/appl/gssftp/ftp/ruserpass.c
+++ b/src/appl/gssftp/ftp/ruserpass.c
@@ -187,8 +187,7 @@ next:
case LOGIN:
if (token()) {
if (*aname == 0) {
- *aname = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aname, tokval);
+ *aname = strdup(tokval);
} else {
if (strcmp(*aname, tokval))
goto next;
@@ -204,8 +203,7 @@ next:
goto bad;
}
if (token() && *apass == 0) {
- *apass = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*apass, tokval);
+ *apass = strdup(tokval);
}
break;
case ACCOUNT:
@@ -216,8 +214,7 @@ next:
goto bad;
}
if (token() && *aacct == 0) {
- *aacct = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aacct, tokval);
+ *aacct = strdup(tokval);
}
break;
case MACDEF: