From: jsg Date: Sat, 23 May 2015 14:28:37 +0000 (+0000) Subject: fix a memory leak in an error path X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8083a5d2b1c072af02b75d0ca942965a8e4c9387;p=openbsd fix a memory leak in an error path ok markus@ dtucker@ --- diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 8f032363d40..680136a403c 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.118 2015/04/24 01:36:00 deraadt Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.119 2015/05/23 14:28:37 jsg Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -401,6 +401,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests, error("Invalid packet back from SSH2_FXP_INIT (type %u)", type); sshbuf_free(msg); + free(ret); return(NULL); } if ((r = sshbuf_get_u32(msg, &ret->version)) != 0)