drm/i915: Fix error state memory leaks
authorBen Widawsky <ben@bwidawsk.net>
Sat, 25 May 2013 21:42:54 +0000 (14:42 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 31 May 2013 18:53:55 +0000 (20:53 +0200)
Found with kmemleak.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index 6efe3b0d3e84c01fbd1d1a7b0c317acecb087a5d..4df2b3fa4ebd6244ea02d688bdb342e30a8631b3 100644 (file)
@@ -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,