[PATCH 4/4] amdkfd: Fix possible dangling ptr in kfd_dbgmgr_destroy()

Edward O'Callaghan funfunctor at folklore1984.net
Sat Sep 3 02:49:07 UTC 2016


Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
 drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c b/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
index 56d6763..8a26d5a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
@@ -58,6 +58,7 @@ void kfd_dbgmgr_destroy(struct kfd_dbgmgr *pmgr)
 	if (pmgr != NULL) {
 		kfd_dbgmgr_uninitialize(pmgr);
 		kfree(pmgr);
+		pmgr = NULL;
 	}
 }
 
-- 
2.7.4



More information about the amd-gfx mailing list