diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.101 2003/02/02 10:51:13 markus Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.102 2003/03/05 22:33:43 markus Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -395,10 +395,14 @@ toremote(targ, argc, argv) | |||
395 | suser = argv[i]; | 395 | suser = argv[i]; |
396 | if (*suser == '\0') | 396 | if (*suser == '\0') |
397 | suser = pwd->pw_name; | 397 | suser = pwd->pw_name; |
398 | else if (!okname(suser)) | 398 | else if (!okname(suser)) { |
399 | xfree(bp); | ||
399 | continue; | 400 | continue; |
400 | if (tuser && !okname(tuser)) | 401 | } |
402 | if (tuser && !okname(tuser)) { | ||
403 | xfree(bp); | ||
401 | continue; | 404 | continue; |
405 | } | ||
402 | snprintf(bp, len, | 406 | snprintf(bp, len, |
403 | "%s%s %s -n " | 407 | "%s%s %s -n " |
404 | "-l %s %s %s %s '%s%s%s:%s'", | 408 | "-l %s %s %s %s '%s%s%s:%s'", |