* [PATCH] staging: comedi: fix memory leak
@ 2014-03-14 16:16 Levente Kurusa
2014-03-15 3:30 ` Chase Southwood
0 siblings, 1 reply; 4+ messages in thread
From: Levente Kurusa @ 2014-03-14 16:16 UTC (permalink / raw)
To: Ian Abbott, H Hartley Sweeten
Cc: Greg Kroah-Hartman, OSUOSL Drivers, LKML, Levente Kurusa
Call kfree() on bdev. The variable is otherwise leaked.
Signed-off-by: Levente Kurusa <levex@linux.com>
---
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..406aedb 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -254,6 +254,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
if (!devs) {
dev_err(dev->class_dev,
"Could not allocate memory. Out of memory?\n");
+ kfree(bdev);
return -ENOMEM;
}
devpriv->devs = devs;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: comedi: fix memory leak
2014-03-14 16:16 [PATCH] staging: comedi: fix memory leak Levente Kurusa
@ 2014-03-15 3:30 ` Chase Southwood
2014-03-15 6:55 ` Levente Kurusa
0 siblings, 1 reply; 4+ messages in thread
From: Chase Southwood @ 2014-03-15 3:30 UTC (permalink / raw)
To: Levente Kurusa, Ian Abbott, H Hartley Sweeten
Cc: Greg Kroah-Hartman, OSUOSL Drivers, LKML
>On Friday, March 14, 2014 11:47 AM, Levente Kurusa <levex@linux.com> wrote:
>Call kfree() on bdev. The variable is otherwise leaked.
>
>Signed-off-by: Levente Kurusa <levex@linux.com>
>---
>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..406aedb 100644
>--- a/drivers/staging/comedi/drivers/comedi_bond.c
>+++ b/drivers/staging/comedi/drivers/comedi_bond.c
>@@ -254,6 +254,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
> if (!devs) {
> dev_err(dev->class_dev,
> "Could not allocate memory. Out of memory?\n");
>+ kfree(bdev);
> return -ENOMEM;
> }
> devpriv->devs = devs;
>--
>1.8.3.1
>
Levente,
This change has already been made in staging-next (by me, actually :) ). In
order to avoid re-doing work which has already been done, please make sure to base
all of your patches off of linux-next (or for staging, staging-next).
Thanks,
Chase
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: comedi: fix memory leak
2014-03-15 3:30 ` Chase Southwood
@ 2014-03-15 6:55 ` Levente Kurusa
2014-03-15 7:21 ` Chase Southwood
0 siblings, 1 reply; 4+ messages in thread
From: Levente Kurusa @ 2014-03-15 6:55 UTC (permalink / raw)
To: Chase Southwood
Cc: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman, OSUOSL Drivers,
LKML
On 03/15/2014 04:30 AM, Chase Southwood wrote:
>> On Friday, March 14, 2014 11:47 AM, Levente Kurusa <levex@linux.com> wrote:
>
>> Call kfree() on bdev. The variable is otherwise leaked.
>>
>> Signed-off-by: Levente Kurusa <levex@linux.com>
>> [...]
>>
>
>
> Levente,
>
> This change has already been made in staging-next (by me, actually :) ). In
> order to avoid re-doing work which has already been done, please make sure to base
> all of your patches off of linux-next (or for staging, staging-next).
>
> Thanks,
> Chase
>
Ah, yes I see now. I wonder how it didn't reach my tree.
Anyways, thanks for the heads up!
--
Regards,
Levente Kurusa
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: comedi: fix memory leak
2014-03-15 6:55 ` Levente Kurusa
@ 2014-03-15 7:21 ` Chase Southwood
0 siblings, 0 replies; 4+ messages in thread
From: Chase Southwood @ 2014-03-15 7:21 UTC (permalink / raw)
To: Levente Kurusa
Cc: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman, OSUOSL Drivers,
LKML
>On Saturday, March 15, 2014 1:55 AM, Levente Kurusa <levex@linux.com> wrote:
>>On 03/15/2014 04:30 AM, Chase Southwood wrote:
>>> On Friday, March 14, 2014 11:47 AM, Levente Kurusa <levex@linux.com> wrote:
>>>
>>>Call kfree() on bdev. The variable is otherwise leaked.
>>>
>>>Signed-off-by: Levente Kurusa <levex@linux.com>
>>>[...]
>>>
>>
>>
>>Levente,
>>
>>This change has already been made in staging-next (by me, actually :) ). In
>>order to avoid re-doing work which has already been done, please make sure to base
>>all of your patches off of linux-next (or for staging, staging-next).
>>
>>Thanks,
>>Chase
>>
>
>Ah, yes I see now. I wonder how it didn't reach my tree.
>Anyways, thanks for the heads up!
>
>--
>Regards,
>Levente Kurusa
No problem, just wanted to make sure you were working from an up-to-date tree :)
Thanks,
Chase
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-15 7:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 16:16 [PATCH] staging: comedi: fix memory leak Levente Kurusa
2014-03-15 3:30 ` Chase Southwood
2014-03-15 6:55 ` Levente Kurusa
2014-03-15 7:21 ` Chase Southwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.