summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2007-04-18 12:10:06 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2007-04-18 12:10:06 +0100
commit87b46bd436074572b3a62e2fb7ec85a1db8df892 (patch)
tree2a4b50765a8622930794a7c020512ab4b35a2021 /linux-core
parent191594ebd5fbe3ac3615247c4e2cd50e1b099635 (diff)
free the duplicated mode.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index f6c675c5..16bbd9b6 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -184,7 +184,7 @@ void drm_crtc_probe_output_modes(struct drm_device *dev, int maxX, int maxY)
drm_mode_prune_invalid(dev, &output->modes, TRUE);
if (list_empty(&output->modes)) {
- struct drm_display_mode *newmode;
+ struct drm_display_mode *stdmode;
DRM_DEBUG("No valid modes found on %s\n", output->name);
@@ -193,10 +193,11 @@ void drm_crtc_probe_output_modes(struct drm_device *dev, int maxX, int maxY)
* here and bailed in the past, now we add a standard
* 640x480@60Hz mode and carry on.
*/
- newmode = drm_mode_duplicate(dev, &std_mode[0]);
+ stdmode = drm_mode_duplicate(dev, &std_mode[0]);
drm_mode_probed_add(output, newmode);
drm_mode_list_concat(&output->probed_modes,
&output->modes);
+ drm_crtc_mode_destroy(dev, stdmode);
DRM_DEBUG("Adding standard 640x480 @ 60Hz to %s\n",
output->name);