[PATCH xf86-video-ati 1/4] Free pRADEONEnt memory in RADEONFreeRec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

We were leaking it.

(Inspired by amdgpu commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux