summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2015-07-14 13:42:49 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-07-14 17:18:22 +0200
commitb06f8b0df73dea39337e394805827491d0b1585c (patch)
tree59d4b58dcfa48a19abb93386864870a6fe27ad34 /drivers/gpu/drm/i915/intel_display.c
parent4cf0ebbd4fafbdf8e6431dbb315e5511c3efdc3b (diff)
downloadlwn-b06f8b0df73dea39337e394805827491d0b1585c.tar.gz
lwn-b06f8b0df73dea39337e394805827491d0b1585c.zip
drm/i915: Fix reference leak in intel_modeset_readout_hw_state.
Unreference the old mode_blob by calling the crtc_destroy_state helper before zeroing the crtc_state. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ba2c933fcea2..4325d00a4598 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15441,6 +15441,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
int i;
for_each_intel_crtc(dev, crtc) {
+ __drm_atomic_helper_crtc_destroy_state(&crtc->base, crtc->base.state);
memset(crtc->config, 0, sizeof(*crtc->config));
crtc->config->base.crtc = &crtc->base;