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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>On Friday, March 14, 2014 11:47 AM, Levente Kurusa <levex@xxxxxxxxx> wrote:

>Call kfree() on bdev. The variable is otherwise leaked.
>
>Signed-off-by: Levente Kurusa <levex@xxxxxxxxx>
>---
>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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux