summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsg@openbsd.org <jsg@openbsd.org>2015-05-23 14:28:37 +0000
committerDamien Miller <djm@mindrot.org>2015-05-25 09:49:46 +1000
commit64a89ec07660abba4d0da7c0095b7371c98bab62 (patch)
tree0b46ede04490199b2e0f9c0175909a573ca2608d
parentf948737449257d2cb83ffcfe7275eb79b677fd4a (diff)
upstream commit
fix a memory leak in an error path ok markus@ dtucker@ Upstream-ID: bc1da0f205494944918533d8780fde65dff6c598
-rw-r--r--sftp-client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sftp-client.c b/sftp-client.c
index 32deaa714..d12ca26ec 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.118 2015/04/24 01:36:00 deraadt Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.119 2015/05/23 14:28:37 jsg 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 *
@@ -408,6 +408,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
408 error("Invalid packet back from SSH2_FXP_INIT (type %u)", 408 error("Invalid packet back from SSH2_FXP_INIT (type %u)",
409 type); 409 type);
410 sshbuf_free(msg); 410 sshbuf_free(msg);
411 free(ret);
411 return(NULL); 412 return(NULL);
412 } 413 }
413 if ((r = sshbuf_get_u32(msg, &ret->version)) != 0) 414 if ((r = sshbuf_get_u32(msg, &ret->version)) != 0)