freedreno: fix fence-fd leak

sync_accumulate() does not take ownership.

Fixes: bf23ff83e6 ("freedreno: fence_server_sync() fixes")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6692>
This commit is contained in:
Rob Clark
2020-09-11 13:11:52 -07:00
parent ef980ac0c1
commit eceb4fb904

View File

@@ -519,6 +519,7 @@ fd_context_switch_to(struct fd_context *ctx, struct fd_batch *batch)
{
if (ctx->in_fence_fd != -1) {
sync_accumulate("freedreno", &batch->in_fence_fd, ctx->in_fence_fd);
close(ctx->in_fence_fd);
ctx->in_fence_fd = -1;
}
}