Unref the prison after proctree is dropped.
This commit is contained in:
parent
65f29b9caa
commit
7e588b9219
@ -530,9 +530,6 @@ exit1(struct thread *td, int rval, int signo)
|
||||
PROC_LOCK(p);
|
||||
p->p_xthread = td;
|
||||
|
||||
/* Tell the prison that we are gone. */
|
||||
prison_proc_free(p->p_ucred->cr_prison);
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/*
|
||||
* Tell the DTrace fasttrap provider about the exit if it
|
||||
@ -603,6 +600,9 @@ exit1(struct thread *td, int rval, int signo)
|
||||
PROC_LOCK(p->p_pptr);
|
||||
sx_xunlock(&proctree_lock);
|
||||
|
||||
/* Tell the prison that we are gone. */
|
||||
prison_proc_free(p->p_ucred->cr_prison);
|
||||
|
||||
/*
|
||||
* The state PRS_ZOMBIE prevents other proesses from sending
|
||||
* signal to the process, to avoid memory leak, we free memory
|
||||
|
Loading…
Reference in New Issue
Block a user