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
......@@ -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)
......
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