提交 5a1e6f75 编写于 作者: A Axel Lin 提交者: Linus Torvalds

drivers/misc/spear13xx_pcie_gadget.c: fix a memory leak in spear_pcie_gadget_probe error path

In the case of goto err_kzalloc, we should kfree target.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NPratyush Anand <pratyush.anand@st.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 32e45ff4
......@@ -845,7 +845,7 @@ static int __devinit spear_pcie_gadget_probe(struct platform_device *pdev)
err_iounmap_app:
iounmap(config->va_app_base);
err_kzalloc:
kfree(config);
kfree(target);
err_rel_res:
release_mem_region(res1->start, resource_size(res1));
err_rel_res0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册