15723 - DIVISION_BY_ZERO
25769 - DIVISION_BY_ZERO
25770 - DIVISION_BY_ZERO
Change-Id: Icfed0528b6891af56f51c4c7864652ae01801ef8
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
&hcount, &gem_size) != NUM_GEM_FIELD)
return NULL;
+ if (hcount == 0)
+ return NULL;
tgeminfo = malloc(sizeof(geminfo));
if (tgeminfo == NULL)
return NULL;
}
}
+ if (total_mem == 0) {
+ fprintf(stderr, "cannot get total memory size\n");
+ fclose(fp);
+ return;
+ }
+
if (available == 0)
available = free + cached;
used = total_mem - available;