From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4Q92-0001CT-Ml for qemu-devel@nongnu.org; Wed, 09 Nov 2016 05:30:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4Q8x-00068n-6L for qemu-devel@nongnu.org; Wed, 09 Nov 2016 05:30:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c4Q8x-00068J-0i for qemu-devel@nongnu.org; Wed, 09 Nov 2016 05:30:11 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DA074E4E6 for ; Wed, 9 Nov 2016 10:30:10 +0000 (UTC) Date: Wed, 9 Nov 2016 10:30:05 +0000 From: "Daniel P. Berrange" Message-ID: <20161109103005.GD22181@redhat.com> Reply-To: "Daniel P. Berrange" References: <20161109102818.9566-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161109102818.9566-1-marcandre.lureau@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCHv2] cipher: fix leak on initialization error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: qemu-devel@nongnu.org On Wed, Nov 09, 2016 at 02:28:18PM +0400, Marc-Andr=C3=A9 Lureau wrote: > On error path, ctx may be leaked. Assign ctx earlier, and call > qcrypto_cipher_free() on error. >=20 > Spotted thanks to ASAN. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > crypto/cipher-nettle.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Thanks, queued on my crypto-next branch Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr= / :|