2012-05-06 03:13:40

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH] ISP1704 USB Charger: Fix use-after-free error in isp1704_charger_probe()

On Sun, Apr 22, 2012 at 10:34:59PM +0200, Marek Vasut wrote:
[...]
> > -
> > dev_err(&pdev->dev, "failed to register isp1704 with error %d\n", ret);
> > -
> > isp1704_charger_set_power(isp, 0);
> > + kfree(isp);

Dan Carpenter sent a similar fix ~month ago, so it's in already.

> Use devm_kzalloc() and be done with all this goo?

Yeah, that's actually a good idea.

Thanks,

--
Anton Vorontsov
Email: [email protected]


2012-05-06 13:18:45

by Jesper Juhl

[permalink] [raw]
Subject: Re: [PATCH] ISP1704 USB Charger: Fix use-after-free error in isp1704_charger_probe()


Sorry about the late reply, I've been away from my mailbox for a while.

On Sat, 5 May 2012, Anton Vorontsov wrote:

> On Sun, Apr 22, 2012 at 10:34:59PM +0200, Marek Vasut wrote:
> [...]
> > > -
> > > dev_err(&pdev->dev, "failed to register isp1704 with error %d\n", ret);
> > > -
> > > isp1704_charger_set_power(isp, 0);
> > > + kfree(isp);
>
> Dan Carpenter sent a similar fix ~month ago, so it's in already.
>
Ok :)

> > Use devm_kzalloc() and be done with all this goo?
>
> Yeah, that's actually a good idea.
>
No promises, but I may look into this in a few days.

--
Jesper Juhl <[email protected]> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.