Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp185683pxx; Wed, 28 Oct 2020 02:03:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfudUxYT1K744vbxxQIcb1k5TkQBl1LykaZMM7pSY9f2Aikx8X5ZGQ2CZq5zRC2cl3yXqM X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr3182410edt.111.1603875813617; Wed, 28 Oct 2020 02:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603875813; cv=none; d=google.com; s=arc-20160816; b=OheP2E6XlVXMJvRSs9sabj9x9u4/kzkKKp4ypK97HCPmgc94vwK01+WB5LOypk2jdZ fb2vX78IkwV67CLC0TczDcO7gnInaiy9/rw6b0CUuFfPcN8dNnUmO9/rge2M2OjjfpEe hEy+sZQZqdGpLy4x2To6+Wn3TCCvw4zQZOBYt4WKJSht29EQrqf7ievUkH0qSFeZYOBl LmVguwpmpIkUMRBOgyI30wa3WQgYoeQI1vy4zwq79pz50NQQKL67YNaFkYCd3N9K7BWZ cPm+eaTcYKNpH8k/8g/ovyhEsf5XSIl23DcgeHNK1vUZ57kui/g//ejDQjCMvnu2dN0U LbVg== 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=mp5T3372kZ6RmXV1X0cVgCnvTsZ1jgH5sQB5yJFtdbk=; b=hfI/b7l9U9K3vDXcILytPvShMGsASbkXqlU876SJLPbhj65ecQC+PtRIH67jCHoeAQ 4GjAfK9OG6rhyww0inN5Ik3vgIMq6sSBzS5qLE0cNZQPzZBKYvnJ+xOlGL9fMpxzsddk ZCSwFQhEytF2qtK8YUkmDXz8GAIddB5jhDVUqXglAbNv4YsC75f5DEd69PLHnv8K+5pE SzTbZLvdiIFAiE+pH9ku+LrLe7DQrhH4pXv6wMPLWunkJIbtHYq25pNyjUNLGOraILkL /Lzs0+NC+CfpTResrTMAqiSCe/9gIjjGqoYtxZ7/CceGkjqK3BkG5zelic3ylZ5oV0df c5dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WNyvXNjP; 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 w11si2719069ejq.533.2020.10.28.02.03.11; Wed, 28 Oct 2020 02:03: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=WNyvXNjP; 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 S1756925AbgJ0OPQ (ORCPT + 99 others); Tue, 27 Oct 2020 10:15:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:54270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754549AbgJ0OF5 (ORCPT ); Tue, 27 Oct 2020 10:05:57 -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 5E65322258; Tue, 27 Oct 2020 14:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807555; bh=j2k1YZyoVsRQzQcrqyCwjUzNt94R8oW0p3YZnR0Yn8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNyvXNjPfv2larSOh+qq8wyoIdQsPznrnvzOj9U4mXxvUf6OzqPxFZEv6vOlVNdH5 Jv6Q8P0HA8CYvDN2mMMbgwqr/Gfwfn4cx3hsmUx/t3NLgKvFf1iBM0Y8DbSTinFZYL 7hQE/Ek3PZowJak7CKT7N7Ls4UGLnSKXzGBejU9U= 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.9 094/139] crypto: ccp - fix error handling Date: Tue, 27 Oct 2020 14:49:48 +0100 Message-Id: <20201027134906.595226289@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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 c3f13d6505e15..0aa18c1164bfb 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1195,7 +1195,7 @@ static int 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