parport_cs: Fix memory leak in parport_config
parport_probe() alloc parport device 'info', but while parport_config failed it does not free it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8c2ffd9174
commit
21c75ad65f
|
@ -158,8 +158,9 @@ static int parport_config(struct pcmcia_device *link)
|
|||
return 0;
|
||||
|
||||
failed:
|
||||
parport_cs_release(link);
|
||||
return -ENODEV;
|
||||
parport_cs_release(link);
|
||||
kfree(link->priv);
|
||||
return -ENODEV;
|
||||
} /* parport_config */
|
||||
|
||||
static void parport_cs_release(struct pcmcia_device *link)
|
||||
|
|
Loading…
Reference in New Issue