mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
Don't dereference invalid pointers in procfs_mourn_inferior
This commit is contained in:
parent
d375ce178d
commit
cd4104e085
@ -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
|
||||
|
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user