Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JZIPT-000161-68 for mharc-grub-devel@gnu.org; Wed, 12 Mar 2008 00:17:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZIPR-00015Y-63 for grub-devel@gnu.org; Wed, 12 Mar 2008 00:17:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZIPP-000153-0o for grub-devel@gnu.org; Wed, 12 Mar 2008 00:17:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZIPO-00014u-Tu for grub-devel@gnu.org; Wed, 12 Mar 2008 00:17:42 -0400 Received: from [159.226.39.252] (helo=nrchpc.ac.cn) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZIPO-0001Zk-05 for grub-devel@gnu.org; Wed, 12 Mar 2008 00:17:42 -0400 Received: from zhanghuan ([159.226.39.251]) by nrchpc.ac.cn (8.13.7/8.13.7) with ESMTP id m2C3EqwL019630 for ; Wed, 12 Mar 2008 11:14:53 +0800 From: "zhanghuan" To: Date: Wed, 12 Mar 2008 11:03:51 +0800 Organization: =?utf-8?B?5Zu95a626auY5oCn6IO96K6h566X5py65bel56iL5oqA5pyv56CU56m25Lit5b+D?= Message-ID: <000601c883ed$b35bba00$14280a0a@zhanghuan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0007_01C88430.C17EFA00" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AciD7bK5eFLi9eXoQDyCE7Al5HiMEQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Greylist: delayed 4419 seconds by postgrey-1.27 at monty-python; Wed, 12 Mar 2008 00:17:37 EDT Subject: bug on context X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 04:17:46 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C88430.C17EFA00 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable hi all. Here is a patch fixing a bug on MM error while returning to previous = menu.=20 The following steps should issue the bug: 1. write a menuentry using configfile command to load another menu file; 2. press 'ESC' to return to previous one; 3. repeat 1 and then repeat 2. After looking into the code, I found that when a context is close, it = frees all variables of the previous context instead of what it owned. Zhang Huan Tel: (86)10-6260-0549 Mailing: P. O. Box 2704# Beijing Postcode: 100080 National Research Centre for High Performance Computers Institute of Computing Technology, Chinese Academy of Sciences No. 6, South Kexueyuan Road, Haidian District Beijing, China ------=_NextPart_000_0007_01C88430.C17EFA00 Content-Type: application/octet-stream; name="xxx.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xxx.patch" diff -ur grub-1.96/kern/env.c grub-1.96fix/kern/env.c=0A= --- grub-1.96/kern/env.c 2008-01-06 15:15:07.000000000 +0800=0A= +++ grub-1.96fix/kern/env.c 2008-03-12 10:02:07.000000000 +0800=0A= @@ -124,7 +124,7 @@=0A= {=0A= struct grub_env_var *p, *q;=0A= =0A= - for (p =3D current_context->prev->vars[i]; p; p =3D q)=0A= + for (p =3D current_context->vars[i]; p; p =3D q)=0A= {=0A= q =3D p->next;=0A= grub_free (p);=0A= ------=_NextPart_000_0007_01C88430.C17EFA00--