mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
lima: avoid memleak on error
We should free this pointer, otherwise we're leaking it. CID: 1521251 Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
This commit is contained in:
parent
b8bb9e08bc
commit
0d51248e5d
1 changed files with 3 additions and 1 deletions
|
|
@ -72,8 +72,10 @@ lima_resource_create_scanout(struct pipe_screen *pscreen,
|
|||
|
||||
scanout = renderonly_scanout_for_resource(&scanout_templat,
|
||||
screen->ro, &handle);
|
||||
if (!scanout)
|
||||
if (!scanout) {
|
||||
FREE(res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
res->base = *templat;
|
||||
res->base.screen = pscreen;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue