um: virtio_uml: fix memory leak on init failures
stable inclusion from stable-5.10.69 commit 9d49973b08488f59dd0ada269d9dca210d1fd365 bugzilla: 182675 https://gitee.com/openeuler/kernel/issues/I4I3ED Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9d49973b08488f59dd0ada269d9dca210d1fd365 -------------------------------- commit 7ad28e0d upstream. If initialization fails, e.g. because the connection failed, we leak the 'vu_dev'. Fix that. Reported by smatch. Fixes: 5d38f324 ("um: drivers: Add virtio vhost-user driver") Signed-off-by:Johannes Berg <johannes.berg@intel.com> Acked-By:
Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by:
Richard Weinberger <richard@nod.at> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Acked-by:
Weilong Chen <chenweilong@huawei.com> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment