Index: trunk/Ohana/src/opihi/lib.shell/ListOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/ListOps.c	(revision 26370)
+++ trunk/Ohana/src/opihi/lib.shell/ListOps.c	(revision 26371)
@@ -3,6 +3,6 @@
 
 /*** local static variables used to track the command lists  ***/
-static List *lists;			/* variable to store the list of all lists */
-static int  Nlists;			/* number of currently available lists */
+static List *lists = NULL;	/* variable to store the list of all lists */
+static int  Nlists = 0;		/* number of currently available lists */
 
 void InitLists () {
@@ -16,5 +16,7 @@
   int i, j;
 
-  for (i = 0; i < Nlists; i++) {
+  // Nlists is a bit weird: it is the currently highest valid list, not the number of lists
+  // Nlists = 0 is never allocated
+  for (i = 1; i < Nlists + 1; i++) {
     for (j = 0; j < lists[i].Nlines; j++) {
       free (lists[i].line[j]);
