Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b06f8b0d authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter
Browse files

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: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4cf0ebbd
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -15441,6 +15441,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
	int i;
	int i;


	for_each_intel_crtc(dev, crtc) {
	for_each_intel_crtc(dev, crtc) {
		__drm_atomic_helper_crtc_destroy_state(&crtc->base, crtc->base.state);
		memset(crtc->config, 0, sizeof(*crtc->config));
		memset(crtc->config, 0, sizeof(*crtc->config));
		crtc->config->base.crtc = &crtc->base;
		crtc->config->base.crtc = &crtc->base;