- memory: DIVISION_BY_ZERO
- touchscreen: Resource leaks
Change-Id: I13b2570a61cbeabc236cf0717c9fd056dd17cb19
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
temp = total_rss / (unsigned long)BYTES_PER_KBYTE;
info->rss = (int)temp;
- temp = (total_rss / (unsigned long)total_hcount) / (unsigned long)BYTES_PER_KBYTE;
- info->pss = (int)temp;
+ if (total_hcount > 0) {
+ temp = (total_rss / (unsigned long)total_hcount) / (unsigned long)BYTES_PER_KBYTE;
+ info->pss = (int)temp;
+ } else
+ info->pss = 0;
fclose(fp);
{
hal_backend_touchscreen_funcs *touchscreen_funcs;
+ if (touchscreen_probe() < 0)
+ return -ENOTSUP;
+
touchscreen_funcs = calloc(1, sizeof(hal_backend_touchscreen_funcs));
if (!touchscreen_funcs)
return -ENOMEM;
- if (touchscreen_probe() < 0)
- return -ENOTSUP;
-
touchscreen_funcs->get_state = touchscreen_get_state;
touchscreen_funcs->set_state = touchscreen_set_state;