staging: comedi: fix memory leak
PATCH 1/1 staging: comedi: fix memory leak
Call kfree() on bdev. The variable is otherwise leaked.
--- drivers/staging/comedi/drivers/comedi_bond.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/comedi/drivers/comedi_bond.c +1 -0
@@ -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;
Signature · 1 line
1.8.3.1
Quoted 24 lines · Levente Kurusa
Call
kfree()on bdev. The variable is otherwise leaked.Signed-off-by Levente Kurusa <[email protected]>---
drivers/staging/comedi/drivers/comedi_bond.c| 1 +1 file changed, 1 insertion(+)drivers/staging/comedi/drivers/comedi_bond.c +1
-0@@ -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;Signature · 1 line
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
Quoted 9 lines · Chase Southwood
Quoted 7 lines · Levente Kurusa
Call
kfree()on bdev. The variable is otherwise leaked.Signed-off-by Levente Kurusa <[email protected]>[...]
Quoted 9 lines
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!
Signature · 2 lines
Regards, Levente Kurusa
Quoted 18 lines · Levente Kurusa
Quoted 17 lines · Chase Southwood
Quoted 7 lines · Levente Kurusa
Callkfree()on bdev. The variable is otherwise leaked.Signed-off-by Levente Kurusa <[email protected]>[...]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).
Quoted 10 lines
Quoted 3 lines
Thanks,
ChaseAh, yes I see now. I wonder how it didn't reach my tree. Anyways, thanks for the heads up!
Signature · 2 lines
Regards, Levente Kurusa
No problem, just wanted to make sure you were working from an up-to-date tree :)
Thanks,
Chase