diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2006-05-17 12:43:35 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2006-05-17 12:43:35 +0000 |
commit | 74f83645bee64fbfd065d8770fc401d66d3772b9 (patch) | |
tree | c56463e518e3edbc00750f206496f13ec525d137 /usr.bin/ssh/scp.c | |
parent | 85420ecbd457ade5ecba4b741a4d3619f2974764 (diff) |
fix leak; coverity via Kylene Jo Hall
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index dd4d45f7cd8..2345a98be18 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.141 2006/04/01 05:50:29 djm Exp $ */ +/* $OpenBSD: scp.c,v 1.142 2006/05/17 12:43:34 markus Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -189,7 +189,8 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout) * Reserve two descriptors so that the real pipes won't get * descriptors 0 and 1 because that will screw up dup2 below. */ - pipe(reserved); + if (pipe(reserved) < 0) + fatal("pipe: %s", strerror(errno)); /* Create a socket pair for communicating with ssh. */ if (pipe(pin) < 0) @@ -490,6 +491,7 @@ toremote(char *targ, int argc, char **argv) source(1, argv + i); } } + xfree(arg); } void |