This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] read_command_lines can return freed memory


Committed.

	From 2001-06-15  Eirik Fuller  <eirik@hackrat.com>
	* cli/cli-script.c (free_command_lines): Reset list pointer.


Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.6
diff -c -p -r1.6 cli-script.c
*** cli-script.c	2001/03/13 22:29:14	1.6
--- cli-script.c	2001/06/17 15:14:21
*************** free_command_lines (struct command_line 
*** 1028,1033 ****
--- 1028,1034 ----
        xfree (l);
        l = next;
      }
+   *lptr = NULL;
  }
  
  static void

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]