diff --git a/src/fetch/main.c b/src/fetch/main.c index e1e2cf0ae..3ecbc96bd 100644 --- a/src/fetch/main.c +++ b/src/fetch/main.c @@ -63,6 +63,10 @@ static distro_info distros[] = { static int fetch_cpu_info(fetched_info* fi){ FILE* cpuinfo = fopen("/proc/cpuinfo", "re"); + if(cpuinfo == NULL){ + fprintf(stderr, "Error opening /proc/cpuinfo (%s)\n", strerror(errno)); + return -1; + } char buf[BUFSIZ]; while(fgets(buf, sizeof(buf), cpuinfo)){ #define TAG "model name\t:"