The maps structure can be NULL when scanning kernel processes.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
unsigned long long pf;
int ret, error;
+ if (maps == NULL)
+ return 0;
+
/* Go through the list of allocated memory areas */
list_for_each_entry(map, &maps->list, list) {
start = map->start >> (PAGE_SHIFT - 3);
process->name[ret - 1] = 0;
fclose(file);
+ if (maps == NULL)
+ return;
+
list_for_each_entry(maps, &process->maps->list, list) {
process->pages_present += maps->pages_present;
process->pages_swapped += maps->pages_swapped;