Re: [PATCH] staging: bcm2835: Fix a memory leak in error handling path

2017-02-24 Thread Dan Carpenter
On Fri, Feb 24, 2017 at 10:38:38PM +0100, Stefan Wahren wrote: > > > Dan Carpenter hat am 24. Februar 2017 um 20:57 > > geschrieben: > > > > > > On Fri, Feb 24, 2017 at 01:37:30PM +0100, Stefan Wahren wrote: > > > Hi Christophe, > > > > > > Am 19.02.2017 um 11:34 schrieb Christophe JAILLET: >

Re: [PATCH] staging: bcm2835: Fix a memory leak in error handling path

2017-02-24 Thread Stefan Wahren
> Dan Carpenter hat am 24. Februar 2017 um 20:57 > geschrieben: > > > On Fri, Feb 24, 2017 at 01:37:30PM +0100, Stefan Wahren wrote: > > Hi Christophe, > > > > Am 19.02.2017 um 11:34 schrieb Christophe JAILLET: > > >If 'kzalloc()' fails, we should release resources allocated so far, just as >

Re: [PATCH] staging: bcm2835: Fix a memory leak in error handling path

2017-02-24 Thread Dan Carpenter
On Fri, Feb 24, 2017 at 01:37:30PM +0100, Stefan Wahren wrote: > Hi Christophe, > > Am 19.02.2017 um 11:34 schrieb Christophe JAILLET: > >If 'kzalloc()' fails, we should release resources allocated so far, just as > >done in all other cases in this function. > > > >Signed-off-by: Christophe JAILLE

Re: [PATCH] staging: bcm2835: Fix a memory leak in error handling path

2017-02-24 Thread Stefan Wahren
Hi Christophe, Am 19.02.2017 um 11:34 schrieb Christophe JAILLET: If 'kzalloc()' fails, we should release resources allocated so far, just as done in all other cases in this function. Signed-off-by: Christophe JAILLET --- Not sure that the error handling path is correct. Is 'gdev[0]' freed? Sh

[PATCH] staging: bcm2835: Fix a memory leak in error handling path

2017-02-19 Thread Christophe JAILLET
If 'kzalloc()' fails, we should release resources allocated so far, just as done in all other cases in this function. Signed-off-by: Christophe JAILLET --- Not sure that the error handling path is correct. Is 'gdev[0]' freed? Should it be? --- drivers/staging/media/platform/bcm2835/bcm2835-camer