Skip to content

Commit

Permalink
drm/i915: Don't leak the capture list items
Browse files Browse the repository at this point in the history
When we recently converted the capture code to use vma snapshots,
we forgot to free the struct i915_capture_list list items after use.

Fix that by bringing back a kfree.

Fixes: ff20afc ("drm/i915: Update error capture code to avoid using the current vma state")
Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211209141304.393479-1-thomas.hellstrom@linux.intel.com
  • Loading branch information
Thomas Hellström committed Dec 13, 2021
1 parent b2657ed commit 40aa583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ void i915_request_free_capture_list(struct i915_capture_list *capture)
struct i915_capture_list *next = capture->next;

i915_vma_snapshot_put(capture->vma_snapshot);
kfree(capture);
capture = next;
}
}
Expand Down

0 comments on commit 40aa583

Please sign in to comment.