summaryrefslogtreecommitdiffstats
path: root/scp.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-10 22:50:00 +0100
committerBen Lindstrom <mouring@eviladmin.org>2001-02-10 22:50:00 +0100
commit550bc54cbaecf306fbc487cb82a955f143dc36ae (patch)
tree6176a2e4be898f0c0b5d5c7cbd9d5f00efa9f825 /scp.c
parent - markus@cvs.openbsd.org 2001/02/10 12:44:02 (diff)
downloadopenssh-550bc54cbaecf306fbc487cb82a955f143dc36ae.tar.xz
openssh-550bc54cbaecf306fbc487cb82a955f143dc36ae.zip
- danh@cvs.openbsd.org 2001/02/10 0:12:43
[scp.c] revert a small change to allow -r option to work again; ok deraadt@ - danh@cvs.openbsd.org 2001/02/10 15:14:11 [scp.c] fix memory leak; ok markus@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index 0095d6ff8..0da4f9773 100644
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.56 2001/02/08 19:30:52 itojun Exp $");
+RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -799,8 +799,10 @@ sink(argc, argv)
if (mkdir(np, mode | S_IRWXU) < 0)
goto bad;
}
- vect[0] = np;
+ vect[0] = xstrdup(np);
sink(1, vect);
+ if (vect[0])
+ xfree(vect[0]);
if (setimes) {
setimes = 0;
if (utimes(np, tv) < 0)