Don't dereference invalid pointers in procfs_mourn_inferior

This commit is contained in:
Thomas Lord 1994-08-05 17:55:46 +00:00
parent d375ce178d
commit cd4104e085
2 changed files with 13 additions and 2 deletions

View File

@ -56,6 +56,12 @@ Thu Aug 4 07:55:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
target_terminal_inferior once the child execs.
* infrun.c (proceed): Pass argument to PREPARE_TO_PROCEED.
Wed Aug 3 22:41:13 1994 Tom Lord (lord@x1.cygnus.com)
* procfs.c(procfs_mourn_inferior): don't dereference the
procinfo pointer after it has been freed.
Wed Aug 3 12:05:13 1994 Stan Shebs (shebs@andros.cygnus.com)
* breakpoint.c (breakpoint_1): Improve pluralization in display

View File

@ -3540,14 +3540,19 @@ static void
procfs_mourn_inferior ()
{
struct procinfo *pi;
struct procinfo *next_pi;
for (pi = procinfo_list; pi; pi = pi->next)
unconditionally_kill_inferior (pi);
for (pi = procinfo_list; pi; pi = next_pi)
{
next_pi = pi->next;
unconditionally_kill_inferior (pi);
}
unpush_target (&procfs_ops);
generic_mourn_inferior ();
}
/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
static int
procfs_can_run ()