summaryrefslogtreecommitdiffstats
path: root/scp.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-01 23:31:17 +0200
committerDarren Tucker <dtucker@zip.com.au>2013-06-01 23:31:17 +0200
commita627d42e51ffa71e014d7b2d2c07118122fd3ec3 (patch)
tree7bda769de81f509e28d800916fa20abd37906d79 /scp.c
parent - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS (diff)
downloadopenssh-a627d42e51ffa71e014d7b2d2c07118122fd3ec3.tar.xz
openssh-a627d42e51ffa71e014d7b2d2c07118122fd3ec3.zip
- djm@cvs.openbsd.org 2013/05/17 00:13:13
[xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c dns.c packet.c readpass.c authfd.c moduli.c] bye, bye xfree(); ok markus@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/scp.c b/scp.c
index ae3d38802..32e9d00b2 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.172 2013/05/16 09:08:41 dtucker Exp $ */
+/* $OpenBSD: scp.c,v 1.173 2013/05/17 00:13:14 djm Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -578,7 +578,7 @@ toremote(char *targ, int argc, char **argv)
}
if (tuser != NULL && !okname(tuser)) {
- xfree(arg);
+ free(arg);
return;
}
@@ -605,13 +605,13 @@ toremote(char *targ, int argc, char **argv)
*src == '-' ? "-- " : "", src);
if (do_cmd(host, suser, bp, &remin, &remout) < 0)
exit(1);
- (void) xfree(bp);
+ free(bp);
host = cleanhostname(thost);
xasprintf(&bp, "%s -t %s%s", cmd,
*targ == '-' ? "-- " : "", targ);
if (do_cmd2(host, tuser, bp, remin, remout) < 0)
exit(1);
- (void) xfree(bp);
+ free(bp);
(void) close(remin);
(void) close(remout);
remin = remout = -1;
@@ -662,12 +662,12 @@ toremote(char *targ, int argc, char **argv)
exit(1);
if (response() < 0)
exit(1);
- (void) xfree(bp);
+ free(bp);
}
source(1, argv + i);
}
}
- xfree(arg);
+ free(arg);
}
void
@@ -711,11 +711,11 @@ tolocal(int argc, char **argv)
xasprintf(&bp, "%s -f %s%s",
cmd, *src == '-' ? "-- " : "", src);
if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
- (void) xfree(bp);
+ free(bp);
++errs;
continue;
}
- xfree(bp);
+ free(bp);
sink(1, argv + argc - 1);
(void) close(remin);
remin = remout = -1;
@@ -1023,8 +1023,7 @@ sink(int argc, char **argv)
need = strlen(targ) + strlen(cp) + 250;
if (need > cursize) {
- if (namebuf)
- xfree(namebuf);
+ free(namebuf);
namebuf = xmalloc(need);
cursize = need;
}
@@ -1063,8 +1062,7 @@ sink(int argc, char **argv)
}
if (mod_flag)
(void) chmod(vect[0], mode);
- if (vect[0])
- xfree(vect[0]);
+ free(vect[0]);
continue;
}
omode = mode;