cpuidle: Fix kobject memory leaks in error paths
Commit c343bf1b ("cpuidle: Fix three reference count leaks") fixes the cleanup of kobjects; however, it removes kfree() calls altogether, leading to memory leaks. Fix those and also defer the initialization of dev->kobj_dev until after the error check, so that we do not end up with a dangling pointer. Fixes: c343bf1b ("cpuidle: Fix three reference count leaks") Signed-off-by: NAnel Orazgaliyeva <anelkz@amazon.de> Suggested-by: NAman Priyadarshi <apeureka@amazon.de> [ rjw: Subject edits ] Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
想要评论请 注册 或 登录