lavapipe: Resolved write to pointer after free
Write to "alloc" pointer variable after free "alloc"
Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32292>
This commit is contained in:
@@ -1506,6 +1506,7 @@ llvmpipe_import_memory_fd(struct pipe_screen *screen,
|
||||
if (!ret) {
|
||||
free(alloc);
|
||||
*ptr = NULL;
|
||||
return false;
|
||||
} else {
|
||||
*ptr = (struct pipe_memory_allocation*)alloc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user