Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp291764pxx; Wed, 28 Oct 2020 05:10:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdYtJT1Qmvz2UhNB1ldebBOPxFAO+XaYA568yXhVXSA6MlJYis/AkfN6uDSby/0uORRl1k X-Received: by 2002:a17:906:11db:: with SMTP id o27mr2696269eja.487.1603887016027; Wed, 28 Oct 2020 05:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603887016; cv=none; d=google.com; s=arc-20160816; b=X/7jLi8Tks1nmMK64Vejm3gywpusxcNF1G9wwJwQSek3z+HG+vnAIeRyKxkqGG3Ijn QoKHFoK2yUigu6SmqEUjrQ2TfjXNIyvHrNPYzTYWwePvYc1j8MaD5MDv7B6sgb23FM9X AdXgWHY9e+/ej1YKQwouimCzJ+swntQwabW0hfVy07nrpQn0HGfwLRBZUa4OColq01KN O0/sgtXNo/uPlm/RiFyX46718EhA5LHKmiG6ktwWnbEh9Lw+drF+n56M/CkWtyjCDrbn 3+ET157uSCYu/CwO9M1eHmQE4WEQkJq5zXBnYLLTx/gyhFJjVJEZKugS+iJchBzlBlTx dr2A== 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=SJ8IAkAI8P4Ao7sjflVE7G4dOp0kCE6aeZjqo/BGV29BHJ4hvkhyNZGkLZUP6ZJ+n7 uBEqnbId+tfPER17qlJvQrc9F8J0vDRsV0OptfZcyOw0T/NwRuYdoj3bHj8Jbn8dlGZJ 1wawtDbrUYRgDrdJGQ03N1OXDULlZFe3/5AO/EZciuZAqGILI9lp8MqJelWIXtzpLGLH gvgWehdpGLfsc+jyJ63hMnzOAZ75TNo/zBNvl42+P4+7tCd2d6Vao2JVZhEofvQ7DOrn rLMIo0DCXWMU/gvJ+bAWBrta3ZjfmaV6SpzzfU8P7uzXoCnMu+9UWG6Eun/+e5nVEbLv Pa7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="U//Q5fFh"; 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 d4si2698178edr.173.2020.10.28.05.09.53; Wed, 28 Oct 2020 05:10:16 -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="U//Q5fFh"; 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 S1795801AbgJ0PPV (ORCPT + 99 others); Tue, 27 Oct 2020 11:15:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1794548AbgJ0PMU (ORCPT ); Tue, 27 Oct 2020 11:12:20 -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 12C28222C8; Tue, 27 Oct 2020 15:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811539; bh=euSlTIDisOskMB5UgyqLeAfOkw/u0PxXEldvc7fiz98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U//Q5fFhK5maHMUZ3oJcM3ZKcKKnAMDqtpTzXhZnSZ0yAJvmlJak1ZigJOGsaaYQs OBDKQSTRphH41fQK1f69DGJoBPI63eGALaIrIjbflh09jM6VsjKchJj6mCMJBlvdo9 UEW8kzVWsiOi9SRqRSvKBuwrwbcw5DuStO5l6Bj0= 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.8 530/633] crypto: ccp - fix error handling Date: Tue, 27 Oct 2020 14:54:33 +0100 Message-Id: <20201027135547.645352099@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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