summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--scp.c6
-rw-r--r--sftp.c5
-rw-r--r--ssh-agent.c4
-rw-r--r--ssh-keygen.c6
-rw-r--r--sshconnect.c3
6 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index a4579b916..ff7e97ceb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
7 - markus@cvs.openbsd.org 2006/05/16 09:00:00 7 - markus@cvs.openbsd.org 2006/05/16 09:00:00
8 [clientloop.c] 8 [clientloop.c]
9 missing free; from Kylene Hall 9 missing free; from Kylene Hall
10 - markus@cvs.openbsd.org 2006/05/17 12:43:34
11 [scp.c sftp.c ssh-agent.c ssh-keygen.c sshconnect.c]
12 fix leak; coverity via Kylene Jo Hall
10 13
1120060521 1420060521
12 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor 15 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor
@@ -4640,4 +4643,4 @@
4640 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4643 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4641 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4644 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4642 4645
4643$Id: ChangeLog,v 1.4332 2006/06/13 03:00:09 djm Exp $ 4646$Id: ChangeLog,v 1.4333 2006/06/13 03:00:25 djm Exp $
diff --git a/scp.c b/scp.c
index 2778f8f80..e5332972c 100644
--- a/scp.c
+++ b/scp.c
@@ -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
504void 506void
diff --git a/sftp.c b/sftp.c
index 0cc3a470e..22fa6ad2a 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.81 2006/04/20 21:53:44 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.82 2006/05/17 12:43:34 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -548,6 +548,7 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
548 548
549 if (g.gl_matchc == 1 && dst) { 549 if (g.gl_matchc == 1 && dst) {
550 /* If directory specified, append filename */ 550 /* If directory specified, append filename */
551 xfree(tmp);
551 if (is_dir(dst)) { 552 if (is_dir(dst)) {
552 if (infer_path(g.gl_pathv[0], &tmp)) { 553 if (infer_path(g.gl_pathv[0], &tmp)) {
553 err = 1; 554 err = 1;
@@ -572,8 +573,6 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
572 573
573out: 574out:
574 xfree(abs_src); 575 xfree(abs_src);
575 if (abs_dst)
576 xfree(abs_dst);
577 globfree(&g); 576 globfree(&g);
578 return(err); 577 return(err);
579} 578}
diff --git a/ssh-agent.c b/ssh-agent.c
index 681c30235..656e399d4 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.137 2006/03/30 09:58:16 djm Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.138 2006/05/17 12:43:34 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -315,8 +315,8 @@ process_sign_request2(SocketEntry *e)
315 Identity *id = lookup_identity(key, 2); 315 Identity *id = lookup_identity(key, 2);
316 if (id != NULL && (!id->confirm || confirm_key(id) == 0)) 316 if (id != NULL && (!id->confirm || confirm_key(id) == 0))
317 ok = key_sign(id->key, &signature, &slen, data, dlen); 317 ok = key_sign(id->key, &signature, &slen, data, dlen);
318 key_free(key);
318 } 319 }
319 key_free(key);
320 buffer_init(&msg); 320 buffer_init(&msg);
321 if (ok == 0) { 321 if (ok == 0) {
322 buffer_put_char(&msg, SSH2_AGENT_SIGN_RESPONSE); 322 buffer_put_char(&msg, SSH2_AGENT_SIGN_RESPONSE);
diff --git a/ssh-keygen.c b/ssh-keygen.c
index ef417514a..e06ae1a52 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.143 2006/03/30 11:05:17 dtucker Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.144 2006/05/17 12:43:34 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -514,8 +514,10 @@ do_fingerprint(struct passwd *pw)
514 xfree(fp); 514 xfree(fp);
515 exit(0); 515 exit(0);
516 } 516 }
517 if (comment) 517 if (comment) {
518 xfree(comment); 518 xfree(comment);
519 comment = NULL;
520 }
519 521
520 f = fopen(identity_file, "r"); 522 f = fopen(identity_file, "r");
521 if (f != NULL) { 523 if (f != NULL) {
diff --git a/sshconnect.c b/sshconnect.c
index 5f2ad1cfa..e855f1926 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.181 2006/04/20 09:47:59 markus Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.182 2006/05/17 12:43:34 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -928,6 +928,7 @@ ssh_login(Sensitive *sensitive, const char *orighost,
928 ssh_kex(host, hostaddr); 928 ssh_kex(host, hostaddr);
929 ssh_userauth1(local_user, server_user, host, sensitive); 929 ssh_userauth1(local_user, server_user, host, sensitive);
930 } 930 }
931 xfree(local_user);
931} 932}
932 933
933void 934void