diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-01 11:38:22 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-03 09:51:13 +0000 |
commit | a1b7736dac5f2d5876e68c47a0fce3f423840070 (patch) | |
tree | c67d5086847e17d04848e57f8ed25bd37ad85520 /drivers/gpu/drm/drm_fb_helper.c | |
parent | 554f1d7888d4a1055965198d0ac46ba50e8b684e (diff) | |
download | linux-3.10-a1b7736dac5f2d5876e68c47a0fce3f423840070.tar.gz linux-3.10-a1b7736dac5f2d5876e68c47a0fce3f423840070.tar.bz2 linux-3.10-a1b7736dac5f2d5876e68c47a0fce3f423840070.zip |
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: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index aada26f63de..77fec5a9383 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -430,8 +430,11 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper) for (i = 0; i < helper->connector_count; i++) kfree(helper->connector_info[i]); 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); + if (helper->crtc_info[i].mode_set.mode) + drm_mode_destroy(helper->dev, helper->crtc_info[i].mode_set.mode); + } kfree(helper->crtc_info); } |