Use cgiFreeList to free the list
authorJoey Schulze <joey@infodrom.org>
Thu, 6 Dec 2007 18:32:45 +0000 (18:32 +0000)
committerJoey Schulze <joey@infodrom.org>
Thu, 6 Dec 2007 18:32:45 +0000 (18:32 +0000)
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");