mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
zink: Fix memory leak on error path.
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable sampler_view going out of scope leaks the storage it points to.
Fixes: 625457caaf ("zink: handle swapchain acquire failures more directly")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16258>
This commit is contained in:
parent
6214251c03
commit
7f91e8fad9
1 changed files with 3 additions and 1 deletions
|
|
@ -807,8 +807,10 @@ zink_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *pres,
|
|||
}
|
||||
|
||||
if (zink_is_swapchain(res)) {
|
||||
if (!zink_kopper_acquire(ctx, res, UINT64_MAX))
|
||||
if (!zink_kopper_acquire(ctx, res, UINT64_MAX)) {
|
||||
FREE_CL(sampler_view);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ivci = create_ivci(screen, res, &templ, state->target);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue