leak introduced since pdx is not freed, free it at err path and at remove callback Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx> --- V2: replace pdf with pdx drivers/staging/ced1401/usb1401.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/ced1401/usb1401.c b/drivers/staging/ced1401/usb1401.c index 254131d..6787cb7 100644 --- a/drivers/staging/ced1401/usb1401.c +++ b/drivers/staging/ced1401/usb1401.c @@ -1502,6 +1502,7 @@ static int ced_probe(struct usb_interface *interface, error: if (pdx) kref_put(&pdx->kref, ced_delete); // frees allocated memory + kfree(pdx); return retval; } @@ -1530,6 +1531,7 @@ static void ced_disconnect(struct usb_interface *interface) kref_put(&pdx->kref, ced_delete); // decrement our usage count dev_info(&interface->dev, "USB cedusb #%d now disconnected", minor); + kfree(pdx); } // Wait for all the urbs we know of to be done with, then kill off any that -- 1.8.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel