mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 04:10:10 +01:00
nv50: Fix memory leak in error path
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable memobj going out of scope leaks the storage it points to.
Fixes: a157133380 ("nvc0/nv50: support and enable EXT_memory_object*")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23417>
This commit is contained in:
parent
87ac5d7d0a
commit
bfb092b955
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ nv50_memobj_create_from_handle(struct pipe_screen *screen,
|
|||
|
||||
memobj->bo = nouveau_screen_bo_from_handle(screen, handle, &memobj->stride);
|
||||
if (memobj->bo == NULL) {
|
||||
FREE(memobj->bo);
|
||||
FREE(memobj);
|
||||
return NULL;
|
||||
}
|
||||
memobj->handle = handle;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue