[Intel-gfx] [PATCH] drm/i915: Don't leak VBT mode data

Jani Nikula jani.nikula at linux.intel.com
Fri Sep 18 04:27:04 PDT 2015


On Tue, 15 Sep 2015, Matt Roper <matthew.d.roper at intel.com> wrote:
> 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 at intel.com>

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.



> ---
>  drivers/gpu/drm/i915/i915_dma.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> 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);
> -- 
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list