Re: [PATCH] staging: comedi: fix memory leak / bad pointer freeing for chanlist

2014-10-21 Thread Ian Abbott
On 20/10/14 22:38, Hartley Sweeten wrote: On Monday, October 20, 2014 7:11 AM, Ian Abbott wrote: As a follow-up to commit 6cab7a37f5c04 ("staging: comedi: (regression) channel list must be set for COMEDI_CMD ioctl"), Hartley Sweeten pointed out another couple of bugs stemming from commit 6cab7a3

RE: [PATCH] staging: comedi: fix memory leak / bad pointer freeing for chanlist

2014-10-20 Thread Hartley Sweeten
On Monday, October 20, 2014 7:11 AM, Ian Abbott wrote: > As a follow-up to commit 6cab7a37f5c04 ("staging: comedi: (regression) > channel list must be set for COMEDI_CMD ioctl"), Hartley Sweeten pointed > out another couple of bugs stemming from commit 6cab7a37f5c04 ("staging: > comedi: comedi_fops

[PATCH] staging: comedi: fix memory leak / bad pointer freeing for chanlist

2014-10-20 Thread Ian Abbott
As a follow-up to commit 6cab7a37f5c04 ("staging: comedi: (regression) channel list must be set for COMEDI_CMD ioctl"), Hartley Sweeten pointed out another couple of bugs stemming from commit 6cab7a37f5c04 ("staging: comedi: comedi_fops: introduce __comedi_get_user_chanlist()"). Firstly, `do_cmdte

Re: [PATCH] staging: comedi: fix memory leak

2014-03-15 Thread Chase Southwood
>On Saturday, March 15, 2014 1:55 AM, Levente Kurusa wrote: >>On 03/15/2014 04:30 AM, Chase Southwood wrote: >>> On Friday, March 14, 2014 11:47 AM, Levente Kurusa wrote: >>>  >>>Call kfree() on bdev. The variable is otherwise leaked. >>> >>>Signed-off-by: Levente Kurusa >>>[...] >>> >> >> >>Le

Re: [PATCH] staging: comedi: fix memory leak

2014-03-14 Thread Levente Kurusa
On 03/15/2014 04:30 AM, Chase Southwood wrote: >> On Friday, March 14, 2014 11:47 AM, Levente Kurusa wrote: > >> Call kfree() on bdev. The variable is otherwise leaked. >> >> Signed-off-by: Levente Kurusa >> [...] >> > > > Levente, > > This change has already been made in staging-next (by me,

Re: [PATCH] staging: comedi: fix memory leak

2014-03-14 Thread Chase Southwood
>On Friday, March 14, 2014 11:47 AM, Levente Kurusa wrote: >Call kfree() on bdev. The variable is otherwise leaked. > >Signed-off-by: Levente Kurusa >--- >drivers/staging/comedi/drivers/comedi_bond.c | 1 + >1 file changed, 1 insertion(+) > >diff --git a/drivers/staging/comedi/drivers/comedi_bond

[PATCH] staging: comedi: fix memory leak

2014-03-14 Thread Levente Kurusa
Call kfree() on bdev. The variable is otherwise leaked. Signed-off-by: Levente Kurusa --- drivers/staging/comedi/drivers/comedi_bond.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 51a59e5..4

Re: [PATCH] Staging: comedi: fix memory leak in comedi_bond.c

2014-02-10 Thread Ian Abbott
On 2014-02-08 05:02, Chase Southwood wrote: We allocate bdev and then krealloc the devs pointer in order to add bdev at the end of the devpriv->devs array list. But if for some reason this krealloc fails, we need to free bdev before returning an error otherwise this memory is leaked. Signed-off

[PATCH] Staging: comedi: fix memory leak in comedi_bond.c

2014-02-07 Thread Chase Southwood
We allocate bdev and then krealloc the devs pointer in order to add bdev at the end of the devpriv->devs array list. But if for some reason this krealloc fails, we need to free bdev before returning an error otherwise this memory is leaked. Signed-off-by: Chase Southwood --- drivers/staging/com