Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config()
@ 2014-11-07 12:07 Ander Conselvan de Oliveira
  2014-11-07 13:38 ` Paulo Zanoni
  0 siblings, 1 reply; 3+ messages in thread
From: Ander Conselvan de Oliveira @ 2014-11-07 12:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ander Conselvan de Oliveira

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>
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 339e94f..7e2e4d1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3940,6 +3940,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;
 	}
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config()
  2014-11-07 12:07 [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config() Ander Conselvan de Oliveira
@ 2014-11-07 13:38 ` Paulo Zanoni
  2014-11-11 15:15   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Zanoni @ 2014-11-07 13:38 UTC (permalink / raw)
  To: Ander Conselvan de Oliveira; +Cc: Intel Graphics Development

2014-11-07 10:07 GMT-02:00 Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira@intel.com>:
> The cleanup path would reset pll->new_config to NULL but wouldn't free
> the allocated memory.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 339e94f..7e2e4d1 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3940,6 +3940,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;
>         }
>
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config()
  2014-11-07 13:38 ` Paulo Zanoni
@ 2014-11-11 15:15   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-11-11 15:15 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: Ander Conselvan de Oliveira, Intel Graphics Development

On Fri, Nov 07, 2014 at 11:38:48AM -0200, Paulo Zanoni wrote:
> 2014-11-07 10:07 GMT-02:00 Ander Conselvan de Oliveira
> <ander.conselvan.de.oliveira@intel.com>:
> > The cleanup path would reset pll->new_config to NULL but wouldn't free
> > the allocated memory.
> 
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-11 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-07 12:07 [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config() Ander Conselvan de Oliveira
2014-11-07 13:38 ` Paulo Zanoni
2014-11-11 15:15   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox