diff options
author | Damien Miller <djm@mindrot.org> | 2010-06-26 09:38:23 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-06-26 09:38:23 +1000 |
commit | 495663165f9ef1583249e690a8f654b312fbd40e (patch) | |
tree | e8cb1a44b23c048b4bd76b14b39a44b1b3bfcc8c | |
parent | 7aa46ec393dd193d0a45ce7a5eb49413ead8789b (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-- | ChangeLog | 4 | ||||
-rw-r--r-- | sftp-client.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -21,6 +21,10 @@ [session.c] Missing check for chroot_director == "none" (we already checked against NULL); bz#1564 from Jan.Pechanec AT Sun.COM + - 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 20100622 - (djm) [loginrec.c] crank LINFO_NAMESIZE (username length) to 512 diff --git a/sftp-client.c b/sftp-client.c index 6124c0f4..408b2984 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.90 2009/10/11 10:41:26 dtucker Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.91 2010/06/18 04:43:08 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -713,7 +713,8 @@ do_realpath(struct sftp_conn *conn, char *path) u_int status = buffer_get_int(&msg); error("Couldn't canonicalise: %s", fx2txt(status)); - return(NULL); + buffer_free(&msg); + return NULL; } else if (type != SSH2_FXP_NAME) fatal("Expected SSH2_FXP_NAME(%u) packet, got %u", SSH2_FXP_NAME, type); |