From 0cd14777b7e39619f231b841a2d73f3122458030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 20 Oct 2017 17:20:30 +0200 Subject: Always call drmModeFreeProperty after drmModeGetProperty We were not doing so in all cases, leaking memory allocated by the latter. (Cherry picked from amdgpu commit f6b39bcd45cb06976ba8a3600df77fc471c63995) Reviewed-by: Alex Deucher --- src/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 369c1efc..167ecfb4 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1913,8 +1913,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r drmModeFreeProperty(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_r drmModeFreeProperty(props); break; } - drmModeFreeProperty(props); } + drmModeFreeProperty(props); } if (dynamic) { -- cgit v1.2.3