From d2b29312bb6d0b82b19744778e1a0ff1b7ef5ed1 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 7 Jun 2016 21:13:57 +1000 Subject: [PATCH] library: fix new and unref pids test The original test did not NULL the unallocated info pointer. This was incorrectly calling the procps_pids_new() function. Signed-off-by: Craig Small --- proc/test_pids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/test_pids.c b/proc/test_pids.c index 2e6dca13..4740067f 100644 --- a/proc/test_pids.c +++ b/proc/test_pids.c @@ -40,7 +40,7 @@ int check_pids_new_toomany(void *data) int check_pids_new_and_unref(void *data) { - struct procps_pidsinfo *info; + struct procps_pidsinfo *info = NULL; testname = "procps_pids new then unref"; return ( (procps_pids_new(&info, items, 2) == 0) && (procps_pids_unref(&info) == 0) &&