]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_pr...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 27 Apr 2020 18:04:23 +0000 (20:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:18:51 +0000 (08:18 +0200)
commit804bbfc3f28caa09be50bc2733ecc011a8e45c68
tree927c3ac62fd7a9ad9b980c36b3cd72a5bcc27d27
parent5ac0e17eba009715b35d029383c20a6ab23cb5e3
usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_probe()'

commit ccaef7e6e354fb65758eaddd3eae8065a8b3e295 upstream.

'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: 90fccb529d24 ("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>
drivers/usb/gadget/udc/net2272.c