summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-06-26 09:38:23 +1000
committerDamien Miller <djm@mindrot.org>2010-06-26 09:38:23 +1000
commit495663165f9ef1583249e690a8f654b312fbd40e (patch)
treee8cb1a44b23c048b4bd76b14b39a44b1b3bfcc8c
parent7aa46ec393dd193d0a45ce7a5eb49413ead8789b (diff)
- djm@cvs.openbsd.org 2010/06/18 04:43:08
[sftp-client.c] fix memory leak in do_realpath() error path; bz#1771, patch from anicka AT suse.cz
-rw-r--r--ChangeLog4
-rw-r--r--sftp-client.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b38b3ca08..6563597ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
21 [session.c] 21 [session.c]
22 Missing check for chroot_director == "none" (we already checked against 22 Missing check for chroot_director == "none" (we already checked against
23 NULL); bz#1564 from Jan.Pechanec AT Sun.COM 23 NULL); bz#1564 from Jan.Pechanec AT Sun.COM
24 - djm@cvs.openbsd.org 2010/06/18 04:43:08
25 [sftp-client.c]
26 fix memory leak in do_realpath() error path; bz#1771, patch from
27 anicka AT suse.cz
24 28
2520100622 2920100622
26 - (djm) [loginrec.c] crank LINFO_NAMESIZE (username length) to 512 30 - (djm) [loginrec.c] crank LINFO_NAMESIZE (username length) to 512
diff --git a/sftp-client.c b/sftp-client.c
index 6124c0f40..408b29840 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.90 2009/10/11 10:41:26 dtucker Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.91 2010/06/18 04:43:08 djm 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 *
@@ -713,7 +713,8 @@ do_realpath(struct sftp_conn *conn, char *path)
713 u_int status = buffer_get_int(&msg); 713 u_int status = buffer_get_int(&msg);
714 714
715 error("Couldn't canonicalise: %s", fx2txt(status)); 715 error("Couldn't canonicalise: %s", fx2txt(status));
716 return(NULL); 716 buffer_free(&msg);
717 return NULL;
717 } else if (type != SSH2_FXP_NAME) 718 } else if (type != SSH2_FXP_NAME)
718 fatal("Expected SSH2_FXP_NAME(%u) packet, got %u", 719 fatal("Expected SSH2_FXP_NAME(%u) packet, got %u",
719 SSH2_FXP_NAME, type); 720 SSH2_FXP_NAME, type);