Commit 21c75ad6 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

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: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c2ffd91
...@@ -159,6 +159,7 @@ static int parport_config(struct pcmcia_device *link) ...@@ -159,6 +159,7 @@ static int parport_config(struct pcmcia_device *link)
failed: failed:
parport_cs_release(link); parport_cs_release(link);
kfree(link->priv);
return -ENODEV; return -ENODEV;
} /* parport_config */ } /* parport_config */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment