[Mesa-dev] [PATCH] ac: Clear meminfo to avoid valgrind warning.
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jun 15 11:10:07 UTC 2018
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 06/15/2018 12:08 AM, Bas Nieuwenhuizen wrote:
> 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) {
>
More information about the mesa-dev
mailing list