summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-08-15 10:10:43 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-08-15 10:10:43 +0800
commited7269e0a377b3135b06cacecc59119f06958feb (patch)
tree3930cd62b106160df8af7ea39bc15a952f9ce6fa
parentf4cb9a135dca9279af8186a9b18bf62ef7351019 (diff)
Always check and free driver private in LVDS destroy
-rw-r--r--src/i830_lvds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 78fd2d8c..96e9f003 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -824,11 +824,9 @@ i830_lvds_destroy (xf86OutputPtr output)
I830Ptr pI830 = I830PTR(pScrn);
I830OutputPrivatePtr intel_output = output->driver_private;
- if (pI830->lvds_fixed_mode)
- {
- xf86DeleteMode (&pI830->lvds_fixed_mode, pI830->lvds_fixed_mode);
+ xf86DeleteMode (&pI830->lvds_fixed_mode, pI830->lvds_fixed_mode);
+ if (intel_output)
xfree (intel_output);
- }
}
#ifdef RANDR_12_INTERFACE