From: Michel Dänzer <[email protected]>

We were leaking it.

(Inspired by amdgpu commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990)

Signed-off-by: Michel Dänzer <[email protected]>
---
 src/radeon_kms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 9ef51693a..df438768c 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -218,7 +218,8 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn)
                     pRADEONEnt->platform_dev->flags & XF86_PDEV_SERVER_FD))
 #endif
                 drmClose(pRADEONEnt->fd);
-            pRADEONEnt->fd = 0;
+            free(pPriv->ptr);
+            pPriv->ptr = NULL;
         }
     }
 
-- 
2.14.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to