Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3067627pxk; Mon, 21 Sep 2020 04:35:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQxM1pzBJMPhgnHYGszQrtjs4yKLxpKMFQL2HSaySnMt38uPGCnCcs8T76oMDwF+hmfsZ8 X-Received: by 2002:a50:a694:: with SMTP id e20mr51506894edc.114.1600688114303; Mon, 21 Sep 2020 04:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600688114; cv=none; d=google.com; s=arc-20160816; b=qdnvH2FhoJ+T3ebgFeBZaZHhowwYGj7XxHuQEYADZnw/7rOXinEYeQVAkRfcGYEvKN XKHmwVEX0WZqYfz9iRvHSzgkEDjzgRgr48y9Og0zUtqVa582R42uQak1yNwBw+sVqKGK ELVnAzqOx5b2lkFCvzUZoBrAD8ltl2dyy3Avj6VOfk3PNF6m/Ro8Lwb05SaIqurABrrR I910yhBfXeBqX1bfrae+M9KFpO1nnyfhYE6AlidmHybf5O/gBeKf0dy3q4g5PzY/I8xQ x4CXDBJW3fCCvl6JDEx8xOANDe8+9m5l+lb2Jwr3pyy8u5nk+Jk0h23PIBtmPtPBI3WI F9+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:to:from:date; bh=D5Lidp6XyENw6TYbGX5jKxLJpwo+T9LywvC56HFCIsk=; b=gZQhoEsx1h1fxrn6MFKb54lpXxPpn7UEyz6e9eAj56tE0EWLGbIjUER5LLAgCzx/nJ qk3S4EM5XmIPGkagQvw+UIPMzI3nB8gDYAIaxylaiZhMyqAZJDb1OwH1ONnNfXFSRxh8 Gr/XYOX1dKe6aqwvfDppzbUj1DrYf+8KkpECSLwXvO8c2cgEZZDfAZVkKx9a+1izHL6Q XwxTWJGxwcAR7oBf9jIjhIGvrg6bluDNCUAx6M8MMazW0XUzZHupOsFevAA3aLJS2f+7 pj48r+3zXSAjo6JCBYiSieiXjNjM2SskNHB4keVJLCX5di42rQ05E4SqpYhlnrEPaaYL AnBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu13si8424082ejb.395.2020.09.21.04.34.47; Mon, 21 Sep 2020 04:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgIULei (ORCPT + 99 others); Mon, 21 Sep 2020 07:34:38 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:36970 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgIULei (ORCPT ); Mon, 21 Sep 2020 07:34:38 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 21FF51C0B7A; Mon, 21 Sep 2020 13:34:36 +0200 (CEST) Date: Mon, 21 Sep 2020 13:34:35 +0200 From: Pavel Machek To: thomas.lendacky@amd.com, john.allen@amd.com, herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: ccp - fix error handling Message-ID: <20200921113435.GA20450@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Fix resource leak in error handling. Signed-off-by: Pavel Machek (CIP) diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index bd270e66185e..40869ea1ed20 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1744,7 +1744,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct c= cp_cmd *cmd) break; default: ret =3D -EINVAL; - goto e_ctx; + goto e_data; } } else { /* Stash the context */ --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX2iPywAKCRAw5/Bqldv6 8kt6AKCJfXT80NLwOxJcyAGK6AhV0nDn0QCcDmbOodUew6N04IcDIE4W858W680= =HHOS -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--