Use cgiFreeList to free the list
[infodrom/cgilib] / cgitest.c
index c2b8807..2abea53 100644 (file)
--- a/cgitest.c
+++ b/cgitest.c
@@ -93,8 +93,7 @@ void listall (char **env)
          } else
              printf ("%s=\n", vars[i]);
       }
-      for (i=0; vars[i] != NULL; i++)
-         free (vars[i]);
+      cgiFreeList (vars);
   } else
       printf ("No variables transmitted.\n");
 
@@ -114,8 +113,7 @@ void listall (char **env)
          } else
              printf ("%s=\n", vars[i]);
       }
-      for (i=0; vars[i] != NULL; i++)
-         free (vars[i]);
+      cgiFreeList (vars);
   } else
       printf ("No cookies transmitted.\n");