st/interop: fix fence leak
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14050
Fixes: 1396dc1c38 ("mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd")
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38310>
This commit is contained in:
Karol Herbst 2025-11-07 17:40:44 +01:00 committed by Marge Bot
parent 6e936ebc9c
commit 87550fc657

View file

@ -437,6 +437,7 @@ st_interop_flush_objects(struct st_context *st,
struct pipe_fence_handle *fence = NULL;
ctx->pipe->flush(ctx->pipe, &fence, PIPE_FLUSH_FENCE_FD | PIPE_FLUSH_ASYNC);
*out->fence_fd = ctx->screen->fence_get_fd(ctx->screen, fence);
ctx->screen->fence_reference(ctx->screen, &fence, NULL);
}
out->version = MIN2(out->version, 1);
} else {