From: Ander Conselvan de Oliveira Date: Fri, 7 Nov 2014 12:07:41 +0000 (+0200) Subject: drm/i915: Plug memory leak in intel_shared_dpll_start_config() X-Git-Tag: v4.14-rc1~6290^2~64^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f354d733f680ec9f9afed0d0fa6429ed259f0a52;p=platform%2Fkernel%2Flinux-rpi.git drm/i915: Plug memory leak in intel_shared_dpll_start_config() The cleanup path would reset pll->new_config to NULL but wouldn't free the allocated memory. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3f4a5b8..ea607f3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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; }