diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-09-14 19:24:18 -0700 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-09-18 14:20:28 +0300 |
commit | 9aa6114253a9d01513796f6b44eda9838dc7bf3b (patch) | |
tree | 7c1e669fba38eaf9ca8a1d2dc0359461dbf1f018 /drivers/gpu/drm/i915/i915_dma.c | |
parent | d637ce3f6dcc0bec950ed4e03e53162500d6b28b (diff) | |
download | op-kernel-dev-9aa6114253a9d01513796f6b44eda9838dc7bf3b.zip op-kernel-dev-9aa6114253a9d01513796f6b44eda9838dc7bf3b.tar.gz |
drm/i915: Don't leak VBT mode data
We allocate memory for LVDS modes while parsing the VBT at startup, but
never free this memory when the driver is unloaded, causing a small
leak.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 066a0ef..c069550 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1137,6 +1137,10 @@ int i915_driver_unload(struct drm_device *dev) dev_priv->vbt.child_dev = NULL; dev_priv->vbt.child_dev_num = 0; } + kfree(dev_priv->vbt.sdvo_lvds_vbt_mode); + dev_priv->vbt.sdvo_lvds_vbt_mode = NULL; + kfree(dev_priv->vbt.lfp_lvds_vbt_mode); + dev_priv->vbt.lfp_lvds_vbt_mode = NULL; vga_switcheroo_unregister_client(dev->pdev); vga_client_register(dev->pdev, NULL, NULL, NULL); |