Skip to content
Commit 4748f968 authored by Yang Yingliang's avatar Yang Yingliang Committed by Rafael J. Wysocki
Browse files

thermal: core: fix some possible name leaks in error paths

In some error paths before device_register(), the names allocated
by dev_set_name() are not freed. Move dev_set_name() front to
device_register(), so the name can be freed while calling
put_device().

Fixes: 1dd7128b

 ("thermal/core: Fix null pointer dereference in thermal_release()")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b778b4d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment