TPM: tpm_nsc: Fix a double free of pdev in cleanup_nsc
platform_device_unregister() will release all resources and remove it from the subsystem, then drop reference count by calling platform_device_put(). We should not call kfree(pdev) after platform_device_unregister(pdev). Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: NJames Morris <jmorris@namei.org>
Showing
想要评论请 注册 或 登录