From patchwork Tue Jun 23 19:55:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 191559 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp2308732ile; Tue, 23 Jun 2020 13:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkmcBbrOVunmVjmhXig2PeT3z2Q7cAgXml6oXMcTYjXY95xL5chDFCViQdbKh9td/6J35A X-Received: by 2002:a17:906:74dc:: with SMTP id z28mr18085492ejl.402.1592944012607; Tue, 23 Jun 2020 13:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592944012; cv=none; d=google.com; s=arc-20160816; b=G1cuVLAYs8G1G0PifWXB0MK7UiM7DXkbBxYW9u9jZulxwJyMUxhJxykRVsiNCD10da g8zhj/itfKF9HCkn/mtl66ZMC/ah3H1qOzOI5bp+mZg4+cfuk41zCnh7hCdoYE871qfo xNGVV2EX02xexOd2csOwje+CHQ0kAIMvU40FjUOqleosHhqqu/nXD01bCK1iZsGfcwUB UlvB7vV8HD0wee836/R8mwnSBKnRPV+24RKBn6B306zx/G6qXqpz6JQ21Cqp9U3D6T8q Z6thjoNjoVSQkkdQbwt9/QxUWuwe55jqCIjLZlQ/tGLUtaPU7LaZsT8/Idim966vLlzH mePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0FRGAVrgvchBE9+xI4sCbdShVYYpDd+8KiBVfT+VYd0=; b=pTFqZOYaDFlZ4bRSFXu6EW06kb4zbRVO0ZfdIDYchgm62fMEjsCOFsYL7Ib6J27Ckb CoO+A+wXXW0y9aNX1VYqGCK0Ah+zWW0pSeNnV3xRfQ8WJfEA65K/zlRWngmy1Xeu0oAX 6+91LDmarOkGMk1Z8s2eRvibHQuqwITsEAXdsK5cAdpakvtald6L49YpiTLKZDGh/eZz VZkR4Hr20XpH81B7w4v4vdXz2ZlBU+1zppSRYf/mMXEflnSF+r/Zf1RfmglM5+BglkRC YPtjTqW4dbVaOtqzSBnYFy8sf0XKTNVGlUpXRmkWPrdvOeE1+MlpDukEbfqlS555J0L4 e9Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V9txVXTd; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 e17si2073888ejk.740.2020.06.23.13.26.52; Tue, 23 Jun 2020 13:26:52 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=V9txVXTd; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390707AbgFWU0u (ORCPT + 15 others); Tue, 23 Jun 2020 16:26:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:46128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390705AbgFWU0t (ORCPT ); Tue, 23 Jun 2020 16:26:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 703462070E; Tue, 23 Jun 2020 20:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944009; bh=U5b0UBf7FMEr2zEPspBFgp7gEax7PArlSSw6xZKwkrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9txVXTdrgZJs26N+mW3KSVI0uqWbQOnhs1c8ZxlWSDfnJ2lWUS86ln0Poel30ZKp flXiTylvJb1wTxQgB8z5yTsM06rZ4ikw6O90ce4fyKCrfLjm1SZ38f+OOc1cAjMyeO dMLQRU9tG7cT2toZYVNuhd0ybL9uTBu+ULV9AM+M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Tero Kristo , Tony Lindgren , Stephen Boyd , Sasha Levin Subject: [PATCH 5.4 138/314] clk: ti: composite: fix memory leak Date: Tue, 23 Jun 2020 21:55:33 +0200 Message-Id: <20200623195345.451347049@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Tero Kristo [ Upstream commit c7c1cbbc9217ebb5601b88d138d4a5358548de9d ] The parent_names is never released for a component clock definition, causing some memory leak. Fix by releasing it once it is no longer needed. Reported-by: Tomi Valkeinen Signed-off-by: Tero Kristo Link: https://lkml.kernel.org/r/20200429131341.4697-2-t-kristo@ti.com Acked-by: Tony Lindgren Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/ti/composite.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 6a89936ba03af..eaa43575cfa5e 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -196,6 +196,7 @@ cleanup: if (!cclk->comp_clks[i]) continue; list_del(&cclk->comp_clks[i]->link); + kfree(cclk->comp_clks[i]->parent_names); kfree(cclk->comp_clks[i]); }