diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-06-18 04:43:09 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-06-18 04:43:09 +0000 |
commit | a09754206567af6ad8f620a1ae74d7220daad7dc (patch) | |
tree | ab013cbf45187259907fc643b8337450a6ec66be | |
parent | d555e2fd899dc78266293c93f5d5f2364ffa8f78 (diff) |
fix memory leak in do_realpath() error path; bz#1771, patch from
anicka AT suse.cz
-rw-r--r-- | usr.bin/ssh/sftp-client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 927f4bf56ab..a222586b20a 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/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> * @@ -705,7 +705,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); |