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: <CACVXFVPtZiw0q=zmVLYGu12xTTGG59fqK6Ju+g3v4nbPdEY1zg@mail.gmail.com>
Date:	Thu, 30 Jul 2015 03:48:49 -0400
From:	Ming Lei <ming.lei@...onical.com>
To:	Vladimir Zapolskiy <vz@...ia.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] firmware: fix wrong memory deallocation in fw_add_devm_name()

On Wed, Jul 29, 2015 at 4:26 PM, Vladimir Zapolskiy <vz@...ia.com> wrote:
> Device resource data allocated with devres_alloc() must be deallocated
> by devres_free().
>
> Signed-off-by: Vladimir Zapolskiy <vz@...ia.com>

Acked-by: Ming Lei <ming.lei@...onical.com>

> ---
>  drivers/base/firmware_class.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index 894bda1..8524450 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -443,7 +443,7 @@ static int fw_add_devm_name(struct device *dev, const char *name)
>                 return -ENOMEM;
>         fwn->name = kstrdup_const(name, GFP_KERNEL);
>         if (!fwn->name) {
> -               kfree(fwn);
> +               devres_free(fwn);
>                 return -ENOMEM;
>         }
>
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ