[Mesa-dev] [PATCH] ac: Clear meminfo to avoid valgrind warning.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Jun 14 22:08:58 UTC 2018
Somehow valgrind misses that the value is initialized by the ioctl.
---
src/amd/common/ac_gpu_info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index e908cc6fa96..e885c0538e9 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -235,7 +235,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
}
if (info->drm_minor >= 9) {
- struct drm_amdgpu_memory_info meminfo;
+ struct drm_amdgpu_memory_info meminfo = {};
r = amdgpu_query_info(dev, AMDGPU_INFO_MEMORY, sizeof(meminfo), &meminfo);
if (r) {
--
2.17.0
More information about the mesa-dev
mailing list