summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-06-13 13:00:25 +1000
committerDamien Miller <djm@mindrot.org>2006-06-13 13:00:25 +1000
commit40b5985fe0b2b8e0b78d7bf7f19bcab6018f0a64 (patch)
tree13438d41f0b7d92461ba2cecb520865245383052 /sftp.c
parent24fd8ddd61bbbb4d1a5accb9b8bf640904e12be5 (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 'sftp.c')
-rw-r--r--sftp.c5
1 files changed, 2 insertions, 3 deletions
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}