Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp190636pxx; Wed, 28 Oct 2020 02:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgbr9+4NirKxqnkKceX6/RwQhsef4U4nTZj45cYlJg5IWQ1bCZ9HqFcFR/L1nNQda/omRz X-Received: by 2002:a17:906:4351:: with SMTP id z17mr6510834ejm.110.1603876413065; Wed, 28 Oct 2020 02:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603876413; cv=none; d=google.com; s=arc-20160816; b=cphkp7OS4gaXxRI+YIreqA4f6Au74iMAFWRGOMihuuE9LIEDHRfzm6cxSK5gZK98m7 mrIq1Dhrz6J4LWj67JlFX5GEc+V4oXg9EiOtu1aoe4RkDvWuGN4lWa7L1/5gZocFSj45 p42UhrDNP9RafX4IBoM4k/KlxG+JjXVigg/YdA1xq/AFJUk9HYv3vEeOk75o/US9sU61 CVFTtm4JhnMISZISK3PlmSorsOFUYvDexY0rAAuiHgLlnUa2KZb54t0QUx2LxaOVkkrm UV/rjQsiaaSs3alVlOFrJ+g02u7sQF6B9m+ZEbNg3BxJ+zeY9zTXAmkMdIWHTonre4IN 5oDg== 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=uf1ow9Twe7fALk/PgaKjAHLSsHpBVnw83L2ASG/Ie5g=; b=pUVWAGGe+BGM8SK1eMW/rRqrLeWdnWmPgOGS/XBQ6BUaqqZxBGZjdmzJYTmSZK+Xki siIh46u6Y5aE7YmjzKyBP07dJJiSOV8puBp29DxxCq1ZvQwaAICHpZlZCp+OAGac3DbG K+9qBge95ZkYqJwOy8eUwOvDdF/jIGUP915HCL4JNIIY4bJNaNPatopEWIuFCcuU9obi bJnQ5SVKlCn2dyIcqBlYod7EjigP9BIk+bH7LSAgbBbICp/kdCj1BJULyp7ta0zusiAX 1mTvtWx/CfF+Yfdz1xTvp5ffWTyn0De3sYjuqUIr4ipDY1AHli7nFw4yFHBe/bL7D2Ph BVIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kOtz3VzI; 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 l12si2820211edk.163.2020.10.28.02.13.11; Wed, 28 Oct 2020 02:13:33 -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=kOtz3VzI; 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 S2900973AbgJ0ORz (ORCPT + 99 others); Tue, 27 Oct 2020 10:17:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:35980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756593AbgJ0OOZ (ORCPT ); Tue, 27 Oct 2020 10:14:25 -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 7145022264; Tue, 27 Oct 2020 14:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808065; bh=maqoZSVQAjmQq5Ak1k2jmwjOBlOlVlYDoIXSuF4W+VY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kOtz3VzIBuSGfboSfwVvR6yvWbUJT5KNIJESkWllYyvCRNKytw3teIj9yfe2k+PkU NCUJyn/CyrySKf/eJkImCqwJsZJRPpHThhEv7vxgHZxi2YmyYw4dsSH2LlV4s/plgt pLmEIL8gRK1S5rpaEzKBI5upy6t/oRqjzeg2HO00= 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 4.14 136/191] crypto: ccp - fix error handling Date: Tue, 27 Oct 2020 14:49:51 +0100 Message-Id: <20201027134916.240944943@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 626b643d610eb..20ca9c9e109e0 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1752,7 +1752,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