Free pRADEONEnt memory in RADEONFreeRec
PATCH 1/4 Free pRADEONEnt memory in RADEONFreeRec
From: Michel Dänzer <[email protected]>
We were leaking it.
(Inspired by amdgpu commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990)
--- src/radeon_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/radeon_kms.c +2 -1
@@ -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 ; } }
Signature · 6 lines
2.14.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20171020152820.14545-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/4 Free memory returned by xf86GetEntityInfo
From: Michel Dänzer <[email protected]>
We were leaking it.
(Ported from amdgpu commit cfccf4c4e7e5c73fe4040fabeb1b43283cf29b33)
--- src/radeon_kms.c | 1 + 1 file changed, 1 insertion(+)
src/radeon_kms.c +1 -0
@@ -228,6 +228,7 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn) info->accel_state =NULL ; } +free (info->pEnt);free (pScrn->driverPrivate); pScrn->driverPrivate =NULL ; }
Signature · 6 lines
2.14.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 Call TimerFree for timer created in LeaveVT
In reply to a message not in the archiveFrom: Michel Dänzer <[email protected]>
We were leaking the memory allocated by TimerSet.
(Ported from amdgpu commit 84aad09f18fed6b52b0c073f0bbd675a6de07807)
--- src/radeon_kms.c | 1 + 1 file changed, 1 insertion(+)
src/radeon_kms.c +1 -0
@@ -2484,6 +2484,7 @@ CARD32 cleanup_black_fb(OsTimerPtr timer, CARD32 now, pointer data)drmmode_fb_reference (pRADEONEnt->fd, &drmmode_crtc->fb,NULL ); } +TimerFree (timer);return 0 ; }
Signature · 6 lines
2.14.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 Always call drmModeFreeProperty after drmModeGetProperty
In reply to a message not in the archiveFrom: Michel Dänzer <[email protected]>
We were not doing so in all cases, leaking memory allocated by the latter.
(Cherry picked from amdgpu commit f6b39bcd45cb06976ba8a3600df77fc471c63995)
--- src/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/drmmode_display.c +2 -2
@@ -1913,8 +1913,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_rdrmModeFreeProperty (props);break ; } -drmModeFreeProperty (props); } +drmModeFreeProperty (props); } kencoders =calloc (sizeof (drmModeEncoderPtr), koutput->count_encoders);
@@ -2003,8 +2003,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_rdrmModeFreeProperty (props);break ; } -drmModeFreeProperty (props); } +drmModeFreeProperty (props); }if (dynamic) {
Signature · 6 lines
2.14.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20171020152820.14545-4-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after drmModeGetProperty
Quoted 10 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Friday, October 20, 2017 11:28 AM
To: [email protected]
Subject: [PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after drmModeGetPropertyFrom: Michel Dänzer <[email protected]>
Quoted 7 lines
We were not doing so in all cases, leaking memory allocated by the latter.
(Cherry picked from amdgpu commit
f6b39bcd45cb06976ba8a3600df77fc471c63995)Signed-off-by Michel Dänzer <[email protected]>
Series is:
Quoted 34 lines
--- src/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)src/drmmode_display.c +0
-0@@ -1913,8 +1913,8 @@ drmmode_output_init(ScrnInfoPtr pScrn,
drmmode_ptrdrmmode, drmModeResPtrmode_rsrc/drmmode_display.c +1
-1drmModeFreeProperty (props);break ; } -drmModeFreeProperty (props); } +drmModeFreeProperty (props); } kencoders = calloc(sizeof(drmModeEncoderPtr), koutput-Quoted 1 line
count_encoders);src/drmmode_display.c +0
-0@@ -2003,8 +2003,8 @@ drmmode_output_init(ScrnInfoPtr pScrn,
drmmode_ptrdrmmode, drmModeResPtrmode_rsrc/drmmode_display.c +1
-2drmModeFreeProperty (props);break ; } -drmModeFreeProperty (props); } +drmModeFreeProperty (props); }if (dynamic) { --2.14.2
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx