[FIX] add check for system cpu freq
authorNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 7 Jul 2013 10:06:13 +0000 (14:06 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Sun, 7 Jul 2013 10:06:13 +0000 (14:06 +0400)
daemon/sys_stat.c

index 8d23415..61f3dc0 100644 (file)
@@ -2022,7 +2022,10 @@ int get_system_info(struct system_info_t *sys_info, int* pidarray, int pidcount)
        }
 
        // update cpu freq
-       update_system_cpu_frequency(event_num);
+       if (update_system_cpu_frequency(event_num) < 0) {
+               LOGE("Failed to update system cpu freq data\n");
+               goto fail_exit;
+       }
 
        // memory data is changed slowly and variance is not remarkable
        // so memory data is less related with timestamp then cpu data