Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp440026rdb; Wed, 20 Dec 2023 01:25:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAK40VrK802xpt80KD8TEgeA12MItoNUQ7iz6VKDSH1/QcZgbvz0g14OLY+QT6Yq4wf307 X-Received: by 2002:a05:620a:46a0:b0:77f:76f2:1b with SMTP id bq32-20020a05620a46a000b0077f76f2001bmr21511394qkb.150.1703064344061; Wed, 20 Dec 2023 01:25:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703064344; cv=none; d=google.com; s=arc-20160816; b=pFPkmzKN+H4OfsTWVLwD3Q9CFClcIEmfcwCLFiimhw4w/Rov55thR1laXWVbCspg57 uuH4ZezR48VDx3JgnrxhH37anBPH9irDXUKtFp+0c6tgDbpGZIXHXkx+tj0Mh4T2swvD EkNb8yxag28qmDOjpG/L7E4ypuFQR7xTzG7sKDVUxcQZ0HLuMtLxKAtXRicdeFw1GmsC 4mQAlWm8H/O4PG6rlvObpe/rbVw2QIwSDUykf4hvzntOF34fua1eF8LaNpBmgywNMcP4 XE/pOEwRZkJYI5+s5DU7u3tGt3jSYfN8Jkc99ejSem6vUjWvKgizMiVIdgi7fGvQSOq9 EfHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hNLsplrCByiiEO/VQ8K/C4vgbzwu3BXO+e3S/xG5KzY=; fh=kJCublX0JbizrC9cOfAAfEWlCbgFGH9dDUUv2h41yT0=; b=e9ywdBykGsg/N4y+KHjgKfsEfXycu4wUY51Q69R89QD+ORnNG+kDLX+saj5RyeVXHL 1eQnIedluW2k9ZKaHxqmaNWQMVaK7LrrTCWNLWCgANk3IYpEB1I7sIyxQ1RzvCalEwuZ sEn+T+X8Q6IRSTv+MCQNM9Fvm9TMm5V8DuGYvO3sM2QpqjYjy9qf4PxUf48HwKh4Sn/v S0rvOizcX4N2Fu2tw1dY9Y8n5Gcc0rk4JnROp0PAIH0kOF2idEC4+SERETZ5t/jYo0g9 5kqLHb4g6JgR4GLxNBvgzZaJDEKuNUUTgag3RcAiftuMX8OlKxnn4VoogxJ39aDzL9Cz dDUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QjHVGf55; spf=pass (google.com: domain of linux-kernel+bounces-6639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m20-20020ae9e714000000b0077d98b59037si2167367qka.600.2023.12.20.01.25.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 01:25:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QjHVGf55; spf=pass (google.com: domain of linux-kernel+bounces-6639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CB33B1C238D1 for ; Wed, 20 Dec 2023 09:25:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C3C81F934; Wed, 20 Dec 2023 09:25:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QjHVGf55" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 014271DA4B for ; Wed, 20 Dec 2023 09:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40c2308faedso63880195e9.1 for ; Wed, 20 Dec 2023 01:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703064321; x=1703669121; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hNLsplrCByiiEO/VQ8K/C4vgbzwu3BXO+e3S/xG5KzY=; b=QjHVGf55xwOa/MGQrs361SpQz8txQ4ukz2ZZg+lhBEQ1gEaCCUW/8HvHjyutO14lUX qY9+p/dw6zVuzeU/YWyNoAtbm4GrvTOMbhdDbiUlUX2OexSfK3IHv8aMYPNYISkwO8XX tmokyazY1jmSC2v8CtyY0/cMsnRfvKmW/itKkPnvZB+y6i1RKiQLFetSZfOEtkz824Ax e9MTXEyd8DQkF4idZhDMhIB9SKvtbsx7MXJePsr8e6Xd4e28pWtEoF2lzWC0jjrGNRQC ho62UXEAAmngl79eyHmeGlhC2gURWxUKghD/kFcgo1/n6LjC1fnS5WxelvI85SSZaJNr yaUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703064321; x=1703669121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hNLsplrCByiiEO/VQ8K/C4vgbzwu3BXO+e3S/xG5KzY=; b=J5+VofW72lXQTofNF6+Zj+Iso0h88GcnJ23Zv+78LkBJYlVVxfYSDnEI0FRqXOu7Zq k5F607yFui0ZvWiOHF+r439zqDwutT/3scZ86SeJyzKetAn6Up7RIEw+3jVyh+g4qf1D 22P3g0VmRgiyI/rFR9Xw6eMLy6Qkt9vRcMtgkFt9Y5dURwFuYlo6DXLExrdo0plreZ97 qRSKea1+4uXId6LGajb/7bFny+MPgumZOKPHveTaGcFn7DiioBB9UY/BNOvR9PRCgQfv 9F7cFmF0xU2FljQJKgpVrJiHt28cpKd86KzEI32QAoFrro+X36yf8CqRLfrMmcxCTXPe hBtQ== X-Gm-Message-State: AOJu0Yw2cVVq0IWtCU4ecVd0Fj7KTMZgboQD0jEDLBxy7gdzDTmgXuTB wis2cjJZAWy+6uO+tzboGfjHrw== X-Received: by 2002:a05:600c:3b26:b0:40c:de2:148c with SMTP id m38-20020a05600c3b2600b0040c0de2148cmr10050483wms.47.1703064321146; Wed, 20 Dec 2023 01:25:21 -0800 (PST) Received: from hackbox.lan ([79.115.23.25]) by smtp.gmail.com with ESMTPSA id be8-20020a05600c1e8800b0040b397787d3sm6921936wmb.24.2023.12.20.01.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 01:25:20 -0800 (PST) From: Abel Vesa To: abelvesa@kernel.org, Kuan-Wei Chiu Cc: peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() Date: Wed, 20 Dec 2023 11:25:12 +0200 Message-Id: <170306426324.94631.3566102445536817606.b4-ty@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231210171907.3410922-1-visitorckw@gmail.com> References: <20231210171907.3410922-1-visitorckw@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Mon, 11 Dec 2023 01:19:07 +0800, Kuan-Wei Chiu wrote: > In cases where imx_clk_is_resource_owned() returns false, the code path > does not handle the failure gracefully, potentially leading to a memory > leak. This fix ensures proper cleanup by freeing the allocated memory > for 'clk_node' before returning. > > Applied, thanks! [1/1] clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() commit: 986439a9b3a32a6ac20042ec17acd443f1e7e86a Best regards, -- Abel Vesa