diff -ur grub-1.96/kern/env.c grub-1.96fix/kern/env.c
--- grub-1.96/kern/env.c	2008-01-06 15:15:07.000000000 +0800
+++ grub-1.96fix/kern/env.c	2008-03-12 10:02:07.000000000 +0800
@@ -124,7 +124,7 @@
     {
       struct grub_env_var *p, *q;
       
-      for (p = current_context->prev->vars[i]; p; p = q)
+      for (p = current_context->vars[i]; p; p = q)
 	{
 	  q = p->next;
 	  grub_free (p);
