Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7419950rwb; Wed, 23 Nov 2022 06:22:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6xSdLC1aRhZKj84kLXtR1lmfaCYVf0LNdE6EADSkHajaIX/tREERT+5wYMzyDzqP+ILM0m X-Received: by 2002:a17:90a:c58b:b0:212:c8bc:1cf5 with SMTP id l11-20020a17090ac58b00b00212c8bc1cf5mr37358238pjt.151.1669213338988; Wed, 23 Nov 2022 06:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669213338; cv=none; d=google.com; s=arc-20160816; b=fjCMV5sYV3I79HIAn6yMWC2E4IwTChJMySOY+oeN3X3ltDw6oW3jIhjq8+YD1rJMFg VphTN+xTHmTEw3zw28Pn4KnyHvoFxMuPYwumPXNE8i5Bm+9scnZlMq5DzKjhBBjOHpYe Hr+wIC+aLpD9CMQSqrWARq8uxZ/6WB5pG+5pBRuNQYbdOFZj2Iw3up+PIW86XKNN+Q+M MTtoB183EvL2B8gJU4Qc+GAjM+Y+Oc6dSgykXd/whlYzyKakSmyU7FMubL5jO5CBcFbj t8uNFrDSMo4aaOR5Tql9fiCwQcr9f+iEBenk7yzELWTyxHUIOGHusfcYIWj3z5ekrLxW XrWA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ok9kpBiHJQD6rZrzM+dCDIh+xQtL9cdiOM5IJc/E6Yc=; b=JvGFdOtZP0pBy3/Muu3wbvaHXAWzW86DTuwqLDk70Csr4+pdwJM6t4oyX71mo6JiXQ NNv5XgHcjxzWeOQ2y9NkEbIEUQ+WdYtRMuqKzPBALMye7sPltL77fHEWsJbwqPwbmOsk 9kBSIuj1iSdBMrPQzNu4yk6ScxkMn8A9F7y2zFi7KH7RA4yJTfl9C042w71t6vRhFO7p IIMs5yvqmQPHDF66EpOVY09wNNbiul+x8YPqxsc1h8bITOPca9aP+bxT/QzRv0XL6bH2 eV6QVQltNPAF4TWxtDRGlEZfq8LI/B37XhqSkduHNfQRzvIFwIxT4YWgOq2By5M8TdEC QaKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056a00238700b00565de49c23dsi17473527pfc.105.2022.11.23.06.22.07; Wed, 23 Nov 2022 06:22:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238516AbiKWOGE (ORCPT + 89 others); Wed, 23 Nov 2022 09:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236175AbiKWOFh (ORCPT ); Wed, 23 Nov 2022 09:05:37 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5646669DC7; Wed, 23 Nov 2022 06:01:55 -0800 (PST) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oxqJq-0008O9-Qm; Wed, 23 Nov 2022 15:01:42 +0100 From: Heiko Stuebner To: Xiu Jianfeng , mturquette@baylibre.com, sboyd@kernel.org, mturquette@linaro.org Cc: Heiko Stuebner , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v2] clk: rockchip: Fix memory leak in rockchip_clk_register_pll() Date: Wed, 23 Nov 2022 15:01:41 +0100 Message-Id: <166921209718.1733563.10543357754581908332.b4-ty@sntech.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221123091201.199819-1-xiujianfeng@huawei.com> References: <20221123091201.199819-1-xiujianfeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Nov 2022 17:12:01 +0800, Xiu Jianfeng wrote: > If clk_register() fails, @pll->rate_table may have allocated memory by > kmemdup(), so it needs to be freed, otherwise will cause memory leak > issue, this patch fixes it. > > Applied, thanks! [1/1] clk: rockchip: Fix memory leak in rockchip_clk_register_pll() commit: 739a6a6bbdb793bd57938cb24aa5a6df89983546 Best regards, -- Heiko Stuebner