diff options
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index da7872aa494..dd84bfdae7d 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -71,7 +71,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.120 2005/03/31 18:39:21 deraadt Exp $"); +RCSID("$OpenBSD: scp.c,v 1.121 2005/04/02 12:41:16 djm Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -362,9 +362,7 @@ toremote(char *targ, int argc, char **argv) if (*targ == 0) targ = "."; - arg = strdup(argv[argc - 1]); - if (!arg) - err(1, "malloc"); + arg = xstrdup(argv[argc - 1]); if ((thost = strrchr(arg, '@'))) { /* user@host */ *thost++ = 0; |