/* to be returned. */
fp = fopen("/proc/self/maps", "r");
+ if(fp == NULL)
+ perror("fopen failed");
+
xbt_assert(fp,
"Cannot open /proc/self/maps to investigate the memory map of the process. Please report this bug.");
}
- if (line)
- free(line);
+ free(line);
+
+ fclose(fp);
return ret;
}