mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_probe()'
commitccaef7e6e3upstream. 'dev' is allocated in 'net2272_probe_init()'. It must be freed in the error handling path, as already done in the remove function (i.e. 'net2272_plat_remove()') Fixes:90fccb529d("usb: gadget: Gadget directory cleanup - group UDC drivers") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Chris
parent
22170ae710
commit
e7d8110180
@@ -2666,6 +2666,8 @@ net2272_plat_probe(struct platform_device *pdev)
|
||||
err_req:
|
||||
release_mem_region(base, len);
|
||||
err:
|
||||
kfree(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user