[PATCH AUTOSEL 4.14 21/89] uio: potential double frees if __uio_register_device() fails

2018-09-02 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit f019f07ecf6a6b8bd6d7853bce70925d90af02d1 ] The uio_unregister_device() function assumes that if "info->uio_dev" is non-NULL that means "info" is fully allocated. Setting info->uio_de has to be the last thing in the function. In the current code, if

[PATCH AUTOSEL 4.14 21/89] uio: potential double frees if __uio_register_device() fails

2018-09-02 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit f019f07ecf6a6b8bd6d7853bce70925d90af02d1 ] The uio_unregister_device() function assumes that if "info->uio_dev" is non-NULL that means "info" is fully allocated. Setting info->uio_de has to be the last thing in the function. In the current code, if