summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-10-20 17:20:30 +0200
committerMichel Dänzer <michel@daenzer.net>2017-10-30 18:41:01 +0100
commit0cd14777b7e39619f231b841a2d73f3122458030 (patch)
tree87e7aae38da5ce4923d28d7d54ababa3f63f2de7
parent84c7d9c1c71d9cee9f50f96671032529b606cf04 (diff)
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 <alexander.deucher@amd.com>
-rw-r--r--src/drmmode_display.c4
1 files 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) {