Commit 4592bfcd authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Sumit Semwal

dma-buf/sw_sync: put fence reference from the fence creation

Once sw_sync_ioctl_create_fence() returns we no longer have the
*pt pointer to the fence base object thus we need to put the reference
we have from the fence creation to keep a correct reference accounting.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1477515599-7685-1-git-send-email-gustavo@padovan.org
parent 74881588
...@@ -316,8 +316,8 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj, ...@@ -316,8 +316,8 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
} }
sync_file = sync_file_create(&pt->base); sync_file = sync_file_create(&pt->base);
dma_fence_put(&pt->base);
if (!sync_file) { if (!sync_file) {
dma_fence_put(&pt->base);
err = -ENOMEM; err = -ENOMEM;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment