diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-02-19 10:36:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-02-19 10:36:26 +0000 |
commit | 9a8ad57cb36d3f27b9b04aa638efe719dc129cbb (patch) | |
tree | a87d60d0bf9fea7d0f979ba8df97b40056b1e723 /usr.bin | |
parent | 6d547e6b7f35ab1252d58108fb0101b9ee3b5a03 (diff) |
np is changed by recursion; vinschen@redhat.com
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/scp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 1974da34324..0ad05c8c406 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $"); +RCSID("$OpenBSD: scp.c,v 1.59 2001/02/19 10:36:25 deraadt Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -785,16 +785,16 @@ sink(argc, argv) } vect[0] = xstrdup(np); sink(1, vect); - if (vect[0]) - xfree(vect[0]); if (setimes) { setimes = 0; - if (utimes(np, tv) < 0) + if (utimes(vect[0], tv) < 0) run_err("%s: set times: %s", - np, strerror(errno)); + vect[0], strerror(errno)); } if (mod_flag) - (void) chmod(np, mode); + (void) chmod(vect[0], mode); + if (vect[0]) + xfree(vect[0]); continue; } omode = mode; |