mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Commit01af542392("usb: ulpi: fix double free in ulpi_register_interface() error path") removed kfree(ulpi) from ulpi_register_interface() to fix a double-free when device_register() fails. But when ulpi_of_register() or ulpi_read_id() fail before device_register() is called, the ulpi allocation is leaked. Add kfree(ulpi) on both error paths to properly clean up the allocation. Fixes:01af542392("usb: ulpi: fix double free in ulpi_register_interface() error path") Cc: stable <[email protected]> Signed-off-by: Felix Gu <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>