From 280be2a193063c9e2f062cbab9fa967a408dc290 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Fri, 15 Aug 2008 10:10:43 +0800 Subject: Always check and free driver private in LVDS destroy (cherry picked from commit ed7269e0a377b3135b06cacecc59119f06958feb) --- src/i830_lvds.c | 6 ++---- 1 file 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 -- cgit v1.2.3