[Pdbg] [PATCH 5/6] main: Init list of procs/cores/threads

Michael Neuling mikey at neuling.org
Tue Jul 3 16:58:09 AEST 2018


These are just on the stack so will contain anything.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 src/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.c b/src/main.c
index 759f955897..1efbcc635a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -266,6 +266,10 @@ static bool parse_options(int argc, char *argv[])
 	};
 	char *endptr;
 
+	memset(p_list, 0, sizeof(p_list));
+	memset(c_list, 0, sizeof(c_list));
+	memset(t_list, 0, sizeof(t_list));
+
 	do {
 		c = getopt_long(argc, argv, "+ab:c:d:hp:s:t:D:V", long_opts, NULL);
 		if (c == -1)
-- 
2.17.1



More information about the Pdbg mailing list