diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index d21401f9f..00936133a 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -107,6 +107,8 @@ static bool detectFrequency(FFCPUResult* cpu) { FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateS("/sys/devices/system/cpu/cpufreq/"); FF_AUTO_CLOSE_DIR DIR* dir = opendir(path.chars); + if (!dir) return false; + FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate(); uint32_t baseLen = path.length; bool flag = false;