hwmon: (coretemp) Avoid leaving around dangling pointer
Storing the struct temp_data pointer allocated from create_core_data() when returning an error has the potential of leaving around a pointer to freed memory. Reset it to NULL for error returns. Reported-by: NJan Beulich <jbeulich@suse.com> Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com> Acked-by: NJean Delvare <khali@linux-fr.org>
Showing
想要评论请 注册 或 登录