diff options
author | Damien Miller <djm@mindrot.org> | 2006-06-13 13:00:25 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-06-13 13:00:25 +1000 |
commit | 40b5985fe0b2b8e0b78d7bf7f19bcab6018f0a64 (patch) | |
tree | 13438d41f0b7d92461ba2cecb520865245383052 /scp.c | |
parent | 24fd8ddd61bbbb4d1a5accb9b8bf640904e12be5 (diff) |
- markus@cvs.openbsd.org 2006/05/17 12:43:34
[scp.c sftp.c ssh-agent.c ssh-keygen.c sshconnect.c]
fix leak; coverity via Kylene Jo Hall
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.141 2006/04/01 05:50:29 djm Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.142 2006/05/17 12:43:34 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -193,7 +193,8 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout) | |||
193 | * Reserve two descriptors so that the real pipes won't get | 193 | * Reserve two descriptors so that the real pipes won't get |
194 | * descriptors 0 and 1 because that will screw up dup2 below. | 194 | * descriptors 0 and 1 because that will screw up dup2 below. |
195 | */ | 195 | */ |
196 | pipe(reserved); | 196 | if (pipe(reserved) < 0) |
197 | fatal("pipe: %s", strerror(errno)); | ||
197 | 198 | ||
198 | /* Create a socket pair for communicating with ssh. */ | 199 | /* Create a socket pair for communicating with ssh. */ |
199 | if (pipe(pin) < 0) | 200 | if (pipe(pin) < 0) |
@@ -499,6 +500,7 @@ toremote(char *targ, int argc, char **argv) | |||
499 | source(1, argv + i); | 500 | source(1, argv + i); |
500 | } | 501 | } |
501 | } | 502 | } |
503 | xfree(arg); | ||
502 | } | 504 | } |
503 | 505 | ||
504 | void | 506 | void |