summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-02-19 10:36:25 +0000
committerderaadt <deraadt@openbsd.org>2001-02-19 10:36:25 +0000
commit5ebdc533b53661be6acf2285ecd04e5c94e474c5 (patch)
treec2145281a3b4db7ed8ae0aaaebeeec359d2474b7
parentOpenSSH_2.5.1 adds bug compat with 1.2.{18-22} (diff)
downloadwireguard-openbsd-5ebdc533b53661be6acf2285ecd04e5c94e474c5.tar.xz
wireguard-openbsd-5ebdc533b53661be6acf2285ecd04e5c94e474c5.zip
np is changed by recursion; vinschen@redhat.com
-rw-r--r--usr.bin/ssh/scp.c12
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;