Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp252915pxx; Wed, 28 Oct 2020 04:10:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi2qKr/v8Qz1WORNZF9TlcHBNdSZyNO7S92WItggCCSFqS2G0ttg4eUfS7Nq7mCXeZNCI8 X-Received: by 2002:aa7:de89:: with SMTP id j9mr7185100edv.363.1603883400392; Wed, 28 Oct 2020 04:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883400; cv=none; d=google.com; s=arc-20160816; b=pz5o69s8h3aXmi9w0OlViii9gOGF7O68VodaQ6c4UPUnNkYw6Jpane3KMVnmxaeGd8 oZ22Pe/o5Ve/Gs7tywx8kdRU7JbYvDl8NVlgAaC6buVi63uKP7GRICoP4D2oyO3+zHit 7UPsjOrKgMdSnIizQhuWPGhMt3hN53k75RGK6RWwhmWLaEZ7gOHf4neWo38KLKlsiLEi 5lTkGjUD3oTiO87E68h+PZ4jlLpc2lfPIOW21veTnV+SvxC9eyqMeL2Lu79mlehQWmRF 2ydnMDISPPsLj7ePV3PlD2mhWPkxkn2WV5TTZwbpmpbrVUeF3yEB5zbY2MgekWJQ6KCa IbJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nQj205UONClX9YYMy6zfHpuVIZnNpT/+4hrBnoWOtOA=; b=fNMwCiE6063RNGAv9zsPyfa50fnV8L6CpB70vi5nenZzaB8GzU7A1cAtwH7Mgmn6eE T8YkC4HLo/z5sdQf0Z/nhv/fxnu6iYIsnvtOkQE88MOwXQC6zA8F/PyjTZyJiBZZSL0z /DTicKWFMUkVhk+zfR/RwOle3yJjA1wTotf+eHCnv+pLh42ECe1Ti5dWLHe8w9fbqkgk 3ptE0A0n6sCY4nEtbTCj7o6pNfSWU2HoTLj2i6vQ99NJxpE7KR4UejktxHLjDbx7wLr3 VP7URLyOH1jSiM+7KqufhxFUReCjL9cA8yO1Ardy3mczdYeuspl2sH9UUiZrHO9yGvMX PEdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2tigc0ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si3663191edn.100.2020.10.28.04.09.37; Wed, 28 Oct 2020 04:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2tigc0ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1786294AbgJ0O7u (ORCPT + 99 others); Tue, 27 Oct 2020 10:59:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:43202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762555AbgJ0OnY (ORCPT ); Tue, 27 Oct 2020 10:43:24 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A81CE206B2; Tue, 27 Oct 2020 14:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809804; bh=euSlTIDisOskMB5UgyqLeAfOkw/u0PxXEldvc7fiz98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2tigc0aeHLdXpmBqNlqFRdVc6pIZ2qOjnXx9YOEw1qd3DNDE9TZJUQOopczdjaUHp G0usHhqQ4eZP+/kGP2aj7T/jsaL8ZI0WxXswh46R3WRYIMZFsudl9tRj31MtwmE+qC 8Z5KwON4QJAKKtgETy7E5W9OwpsrrS2IwRh+3YoY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Pavel Machek (CIP)" , John Allen , Herbert Xu , Sasha Levin Subject: [PATCH 5.4 326/408] crypto: ccp - fix error handling Date: Tue, 27 Oct 2020 14:54:24 +0100 Message-Id: <20201027135510.151206682@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Machek [ Upstream commit e356c49c6cf0db3f00e1558749170bd56e47652d ] Fix resource leak in error handling. Signed-off-by: Pavel Machek (CIP) Acked-by: John Allen Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/ccp/ccp-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 64112c736810e..7234b95241e91 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1746,7 +1746,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) break; default: ret = -EINVAL; - goto e_ctx; + goto e_data; } } else { /* Stash the context */ -- 2.25.1