MFp4 144659:
Plug a memory leak with jail services. PR: 125257 Submitted by: Mateusz Guzik <mjguzik gmail.com> MFC after: 6 days
This commit is contained in:
parent
7a8f695a21
commit
45e48455cd
@ -209,6 +209,8 @@ jail(struct thread *td, struct jail_args *uap)
|
||||
}
|
||||
sx_sunlock(&allprison_lock);
|
||||
e_dropvnref:
|
||||
if (pr->pr_slots != NULL)
|
||||
FREE(pr->pr_slots, M_PRISON);
|
||||
vfslocked = VFS_LOCK_GIANT(pr->pr_root->v_mount);
|
||||
vrele(pr->pr_root);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
@ -339,6 +341,8 @@ prison_complete(void *context, int pending)
|
||||
psrv->ps_destroy(psrv, pr);
|
||||
}
|
||||
sx_sunlock(&allprison_lock);
|
||||
if (pr->pr_slots != NULL)
|
||||
FREE(pr->pr_slots, M_PRISON);
|
||||
|
||||
vfslocked = VFS_LOCK_GIANT(pr->pr_root->v_mount);
|
||||
vrele(pr->pr_root);
|
||||
|
Loading…
Reference in New Issue
Block a user