summaryrefslogtreecommitdiffstats
path: root/src/appl/gssftp/ftpd/ftpcmd.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/appl/gssftp/ftpd/ftpcmd.y')
-rw-r--r--src/appl/gssftp/ftpd/ftpcmd.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y
index 30bced06a8..ae1d11d2fe 100644
--- a/src/appl/gssftp/ftpd/ftpcmd.y
+++ b/src/appl/gssftp/ftpd/ftpcmd.y
@@ -1438,10 +1438,9 @@ copy(s)
{
char *p;
- p = malloc((unsigned) strlen(s) + 1);
+ p = strdup(s);
if (p == NULL)
fatal("Ran out of memory.");
- (void) strcpy(p, s);
return (p);
}