drm/i915: Plug memory leak in intel_shared_dpll_start_config()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 7 Nov 2014 12:07:41 +0000 (14:07 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Nov 2014 09:53:04 +0000 (10:53 +0100)
The cleanup path would reset pll->new_config to NULL but wouldn't free
the allocated memory.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 3f4a5b83bea4d34d89e6164e528fddd8ebe3d99b..ea607f340c766c07bb25591dc3914a01aef2279f 100644 (file)
@@ -3953,6 +3953,7 @@ static int intel_shared_dpll_start_config(struct drm_i915_private *dev_priv,
 cleanup:
        while (--i >= 0) {
                pll = &dev_priv->shared_dplls[i];
+               kfree(pll->new_config);
                pll->new_config = NULL;
        }
 
This page took 0.032494 seconds and 5 git commands to generate.