提交 21c75ad6 编写于 作者: Y YueHaibing 提交者: 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: NYueHaibing <yuehaibing@huawei.com>
Reviewed-by: NMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册