[PATCH v2 1/3] staging: greybus: light: fix memory leak in v4l2 register

Sakari Ailus sakari.ailus at iki.fi
Wed Aug 9 15:36:59 UTC 2017


Hi Rui,

On Wed, Aug 09, 2017 at 02:20:02PM +0100, Rui Miguel Silva wrote:
> Hi Sakari,
> On Wed, Aug 09, 2017 at 02:15:53PM +0300, Sakari Ailus wrote:
> > From: Rui Miguel Silva <rmfrfs at gmail.com>
> > 
> > We are allocating memory for the v4l2 flash configuration structure and
> > leak it in the normal path. Just use the stack for this as we do not
> > use it outside of this function.
> > 
> > Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
> > Reported-by: Sakari Ailus <sakari.ailus at linux.intel.com>
> > Signed-off-by: Rui Miguel Silva <rmfrfs at gmail.com>
> > Reviewed-by: Viresh Kumar <viresh.kumar at linaro.org>
> > ---
> 
> This patch is *not* the patch that I have send, here are the code
> differences from my patch to the one in this series:
> 
> <  	struct led_classdev_flash *iled = NULL;
> ---
> >  	struct led_classdev *iled = NULL;
> 51c57
> <  		iled = &channel_ind->fled;
> ---
> >  		iled = &channel_ind->fled.led_cdev;
> 89c95
> 
> So, this do not apply at all.
> Maybe you change something in your side.

It's been rebased on linux-next and in particular, patch 85f7ff9702bc
("media: v4l2-flash: Use led_classdev instead of led_classdev_flash for
indicator").

-- 
Sakari Ailus
e-mail: sakari.ailus at iki.fi	XMPP: sailus at retiisi.org.uk


More information about the devel mailing list