parport: Revert "parport: fix memory leak"
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sat, 25 Jul 2015 07:49:40 +0000 (13:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jul 2015 19:48:05 +0000 (12:48 -0700)
This reverts commit 23c405912b88 ("parport: fix memory leak")

par_dev->state was already being removed in parport_unregister_device().

Reported-by: Ying Huang <ying.huang@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/share.c

index c02b5f2..5ce5ef2 100644 (file)
@@ -816,7 +816,6 @@ static void free_pardevice(struct device *dev)
        struct pardevice *par_dev = to_pardevice(dev);
 
        kfree(par_dev->name);
-       kfree(par_dev->state);
        kfree(par_dev);
 }