Commit a1b7736d authored by Sascha Hauer's avatar Sascha Hauer Committed by Dave Airlie

drm drm_fb_helper: destroy modes

drm_setup_crtcs allocated modes using drm_mode_duplicate. Free
them in drm_fb_helper_crtc_free.
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 554f1d78
...@@ -430,8 +430,11 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper) ...@@ -430,8 +430,11 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper)
for (i = 0; i < helper->connector_count; i++) for (i = 0; i < helper->connector_count; i++)
kfree(helper->connector_info[i]); kfree(helper->connector_info[i]);
kfree(helper->connector_info); kfree(helper->connector_info);
for (i = 0; i < helper->crtc_count; i++) for (i = 0; i < helper->crtc_count; i++) {
kfree(helper->crtc_info[i].mode_set.connectors); kfree(helper->crtc_info[i].mode_set.connectors);
if (helper->crtc_info[i].mode_set.mode)
drm_mode_destroy(helper->dev, helper->crtc_info[i].mode_set.mode);
}
kfree(helper->crtc_info); kfree(helper->crtc_info);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment