ps: ensuring procps_meminfo_new success, <MEMINFO> api
The 'new' function requires a NULL context pointer, so when existing code worked, it was just a case of luck. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
93a60022dc
commit
78043f6751
@ -100,7 +100,7 @@ static void get_boot_time(void)
|
||||
|
||||
static void get_memory_total()
|
||||
{
|
||||
struct procps_meminfo *mem_info;
|
||||
struct procps_meminfo *mem_info = NULL;
|
||||
if (procps_meminfo_new(&mem_info) < 0)
|
||||
xerrx(EXIT_FAILURE,
|
||||
_("Unable to create meminfo structure"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user