mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 12:50:12 +01:00
v3dv: Initialize time before usage by free_stale_bos.
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value time.tv_sec when calling free_stale_bos.
Fixes: f78c99f357 ("v3dv/bo: add a maximum size for the bo_cache and a envvar to configure it")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7154>
This commit is contained in:
parent
8eb246d7f6
commit
7d1fb5fffe
1 changed files with 1 additions and 0 deletions
|
|
@ -447,6 +447,7 @@ v3dv_bo_free(struct v3dv_device *device,
|
|||
|
||||
if (bo->private &&
|
||||
bo->size > cache->max_cache_size - cache->cache_size) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
mtx_lock(&cache->lock);
|
||||
free_stale_bos(device, time.tv_sec);
|
||||
mtx_unlock(&cache->lock);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue