lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180403135202.3lj4dwafogo5bwrf@mwanda>
Date:   Tue, 3 Apr 2018 16:52:02 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Xidong Wang <wangxidong_97@....com>
Cc:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Xidong Wang <2711406067@...com>, stable@...r.kernel.org
Subject: Re: [PATCH 1/1] taging: fbtft: fix memory leak

There is a typo in the subject.  It should be "Staging" instead of
"taging:".

On Tue, Apr 03, 2018 at 09:14:28PM +0800, Xidong Wang wrote:
> From: Xidong Wang <2711406067@...com>
> 
> In function fbtft_framebuffer_alloc(), the memory allocated by
> framebuffer_alloc() is not released on the error path that txbuflen > 0
> and txbuf, which holds the return value of devm_kzalloc(), is NULL.
> This will result in a memory leak bug.


The txbuf chunk seems to have been dropped.  You're right that it needs
to be fixed as well.

        if (txbuflen > 0) {
                txbuf = devm_kzalloc(par->info->device, txbuflen, GFP_KERNEL);
                if (!txbuf)
-                        goto alloc_fail;
+			 goto err_info;

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ