Re: [patch] read_command_lines can return freed memory

Fernando Nasser
2001-06-17T08:16:00Z

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