diff --git a/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h b/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h index 2c7b28e58b0..2a079a22c7a 100644 --- a/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h +++ b/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h @@ -103,6 +103,8 @@ class CpuInfoLinux : public CpuInfo { strncat(file_pattern, "[0-9]+", 16); DIR *dir = opendir(dir_path); + if (dir == NULL) + return 0; struct dirent *dp; dp = readdir(dir);