mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
dma-buf/sync_file: free fences array in num_fences is 1
When merging sync_files there is a case when we can end up with only one fence in the merged sync_file: when all fences belong to the same timeline. So for this case a fence_array is not created instead we just assigned the fence to sync_file->fence. Then we do not use the fences array anymore nor does free it. This patch frees the array. Reported-by: Chris Wilson <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
parent
6a2925ea12
commit
c654dd0752
1 changed files with 1 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ static int sync_file_set_fence(struct sync_file *sync_file,
|
|||
*/
|
||||
if (num_fences == 1) {
|
||||
sync_file->fence = fences[0];
|
||||
kfree(fences);
|
||||
} else {
|
||||
array = fence_array_create(num_fences, fences,
|
||||
fence_context_alloc(1), 1, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue