[Intel-gfx] [PATCH] drm/i915: Fix error state memory leaks

Daniel Vetter daniel at ffwll.ch
Sun May 26 01:56:33 CEST 2013


On Sat, May 25, 2013 at 02:42:54PM -0700, Ben Widawsky wrote:
> Found with kmemleak.
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Queued for -next, thanks for the patch.
-Daniel
> ---
>  drivers/gpu/drm/i915/i915_irq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 6efe3b0..4df2b3f 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1564,11 +1564,13 @@ i915_error_state_free(struct kref *error_ref)
>  	for (i = 0; i < ARRAY_SIZE(error->ring); i++) {
>  		i915_error_object_free(error->ring[i].batchbuffer);
>  		i915_error_object_free(error->ring[i].ringbuffer);
> +		i915_error_object_free(error->ring[i].ctx);
>  		kfree(error->ring[i].requests);
>  	}
>  
>  	kfree(error->active_bo);
>  	kfree(error->overlay);
> +	kfree(error->display);
>  	kfree(error);
>  }
>  static void capture_bo(struct drm_i915_error_buffer *err,
> -- 
> 1.8.2.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list