Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp154401ybk; Tue, 19 May 2020 18:17:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZpj8P3icHs3cK6HzYZaOsnhBv/i3nzfTj5FPPZA9DsYpL0Z4XdEE6armwSP3tdTf06z2Z X-Received: by 2002:a17:906:cecb:: with SMTP id si11mr1770772ejb.122.1589937477730; Tue, 19 May 2020 18:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589937477; cv=none; d=google.com; s=arc-20160816; b=QhetYDjSnt3eET76UgzV0A/5Y7XagxHQtLvsJrZzxut9habAy8Rbis5BPyufvqKDFS TeTigzCErFWtVxkt5BBI26N1DPArIU25c/B9EYTsXyUTqrQgbrlZvz3wkl6kDGbtEgKy 2emyut2FBGr7FK32HB0voa+mYOzIRF9pq48Lcolsy0KaQF4RuzmJTpwT/2GLT2BauEh6 L7USwONMKsLr+zn4xt/Lg+ZYMsLEbnBzzt9DJ6fnC3hMR8U2/HgfAS4SMhEXUrhK+O4c SI75QG9/9QrVKk5kiQodcb3D7oGByVu6ikK/tqKay2eeHxegQ8CGTbn7RSglT2AxU95w qZ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6aPR3ksdTPnU4uV5L9WxqvCNZiLadNFpBZSxbkaBDt8=; b=u0kJjz816To2z41zJF5d0IHtZStNy6t9VZBNk5epslcbbB2RQ20yU/jpgZEujlNBDD vx5D1JIGqkAm4YRB1jjJbtPFwh36OcJp6yeAseVrI6sMKpBXdRLVw2JakOuFLIRSkLhu 3KVR01zKrhHgtYXN7ubkDDS74IPw1800AyP5DVd7FMLSBbQqV784npg9i/gsqSFTpDSc Crx0c/VWeKSzuNNYnqgxrB8wRVKnreSr3j8eJUr4GkVVUzuA1MHvtFwdxEfS8OaFUONv 6SIExsUlYYOAs+VE7ZkzXPCpUyPL6bq/MvgdrZ4/3bH++CJ8YATF2GgYQ60UmgL0Avzp 822A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G7Ut8+wN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp5si849642ejb.629.2020.05.19.18.17.35; Tue, 19 May 2020 18:17:57 -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=G7Ut8+wN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728451AbgETBQA (ORCPT + 99 others); Tue, 19 May 2020 21:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728432AbgETBP7 (ORCPT ); Tue, 19 May 2020 21:15:59 -0400 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (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 74DC420708; Wed, 20 May 2020 01:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589937359; bh=TwPwgTYvTEYaQWEjnZhfryxbLYyPyfXaMLzE2omlkKU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G7Ut8+wNuQRERggPEgOf4c+nmjtd6XoYxyF/Brh3lBf86yb8TVVysUT2Uiq2ZNAV9 430dMJbypg6RO/AEvQmoZczVLpts9azdxt+u1MWWrxdgeCemkKdoLaAU6+KhEhzBHz 80AMgAgd2p1qGs/gRfNHaULWsNv9ahOchefScL4U= Date: Wed, 20 May 2020 09:15:54 +0800 From: Shawn Guo To: Wei Yongjun Cc: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Dong Aisheng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH -next] firmware: imx: scu: Fix possible memory leak in imx_scu_probe() Message-ID: <20200520011545.GI11739@dragon> References: <20200506051410.27219-1-weiyongjun1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200506051410.27219-1-weiyongjun1@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 06, 2020 at 05:14:10AM +0000, Wei Yongjun wrote: > 'chan_name' is malloced in imx_scu_probe() and should be freed > before leaving from the error handling cases, otherwise it will > cause memory leak. > > Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support") > Signed-off-by: Wei Yongjun Applied, thanks.