Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6465498rwb; Mon, 12 Dec 2022 02:11:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf573q+Uu4sgjKjS2xNCvt7hQCWWUuPN52BLfTpfKbgA56u4uRrM6uelvqXa8GlQ/5Ei1loI X-Received: by 2002:a05:6a20:549e:b0:a3:218a:c761 with SMTP id i30-20020a056a20549e00b000a3218ac761mr23383874pzk.5.1670839863976; Mon, 12 Dec 2022 02:11:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670839863; cv=none; d=google.com; s=arc-20160816; b=DCuNYx/92ZaVL6/xZNumF41Vs93ZcPexEeQhSv4k69DvGms1nnyVQKJ4Pks/3P2Mui jZ3dWH8s5UUjdvuTuWkcKmhTD0/ydwFonebPorTGbgCT6kL5NsYMgCEX3BsvLEn+g/x7 hc5RuPye7fVvozuDzfp/tta3KgX3Pk8ogV7QOOvi8SnmEhjJW3ulo40cMH5MTPb5XDme P9DFb6XntWpKL5mVQIyorFPxZ/t2VitOpPySp2CVlnvTX24c9jsMFSm4ifVaE8fpki55 cbywbYyICMTHIdSu0r29rGbJOWOzEC5iFI67wsy+ApnZ5UFhlvk2bKGMSSLI3Cj7GCQR Ishw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hueZqXitOyeKVIEQU5jrmnA5EwcT5VikDdOaIKWiYLY=; b=V2Uhk8yBY4ehKhbkjL98gXLNDOfNSBU3xhvoUK3w1EpAuzPCIh/FdI+hHOFwPM2fKw M0kmMrv+gNB5Ocbm5aWv7qUCSiYzNUNz2Jj+B8cE+8REbgN1WwilrEFv0ZtFEqRAS3MW OF5bnIAfDop+QFis/qvAttq018QJsvOR9l7zQW1uY2KEjNnR2oEDBgi+ncO1rqEu/qO6 jGSYZsr7X6CWGdi53f7XkTXmlomwURqk6TQRmRZAyj2fcgwqbSNERicjusVxiXzAixoy CfEGU/dyZc/iLIDVwQ+lkw0/S3kMt4pR5KebRlkJ5trxvF74KjWUOmKv0o6QeUY19GLA w5uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jwyJ8ijR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y188-20020a6364c5000000b004779a46d07csi9213889pgb.183.2022.12.12.02.10.54; Mon, 12 Dec 2022 02:11:03 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=jwyJ8ijR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbiLLKAF (ORCPT + 75 others); Mon, 12 Dec 2022 05:00:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiLLKAA (ORCPT ); Mon, 12 Dec 2022 05:00:00 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15FF1B64 for ; Mon, 12 Dec 2022 01:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670839199; x=1702375199; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=etMDtDTcQ349mAtBiuyAlfHrquC9Rp1ynKEdG6YSinI=; b=jwyJ8ijRFdQaslgAyUrWMhWOGbyKLg5JYrqJQzzfkwPv1O3SML8rX7Qt MSfTRezQ5NplWKwK7wWNasLaP++1RSL/0fyfKLibozQyvRDcEBp7w+Z2u d4+TlTEZj01ip49mBoZMY8gVccKVQGCOephTnB0SZ2CCLaBR6jGojLevt oKlgAoj8ZNPokr0slRDugOrKqg9DidKlrsCEZvuJqIKWOXZTtbz0SYVMr vO0eZgX3r+eOmXlAmQd2jfFNqlSu0xpvJ6joiigWK2uauRREizDRzFwgZ cx21prMjTepj/t6f0fnaSVNvvK8zFhZxjs9Cj2YVQ7XPNEjYQuV6qzACP g==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="318957082" X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="318957082" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 01:59:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="893433254" X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="893433254" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP; 12 Dec 2022 01:59:57 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p4fbH-008Peb-1W; Mon, 12 Dec 2022 11:59:55 +0200 Date: Mon, 12 Dec 2022 11:59:55 +0200 From: Andy Shevchenko To: Jianglei Nie Cc: ojeda@kernel.org, geert+renesas@glider.be, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH v3] auxdisplay: hd44780: Fix potential memory leak in hd44780_remove() Message-ID: References: <20221129081542.5890-1-niejianglei2021@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221129081542.5890-1-niejianglei2021@163.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Tue, Nov 29, 2022 at 04:15:42PM +0800, Jianglei Nie wrote: > hd44780_probe() allocates a memory chunk for hd with kzalloc() and > makes "lcd->drvdata->hd44780" point to it. When we call hd44780_remove(), > we should release all relevant memory and resource. But "lcd->drvdata > ->hd44780" is not released, which will lead to a memory leak. > > We should release the "lcd->drvdata->hd44780" in hd44780_remove() to fix > the memory leak bug. Miguel, can this be somehow moved forward? -- With Best Regards, Andy Shevchenko