diff options
author | glebius <glebius@FreeBSD.org> | 2005-10-26 07:18:37 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-10-26 07:18:37 +0000 |
commit | d9ad5313fd8fecf625cb947524ce3d56da1e7600 (patch) | |
tree | 3f4a9f5966afeecc321a52a8cf7599fb04dd68ff /sys/kern/kern_exit.c | |
parent | 092974700594d831ce82e7ffa941f312151f3ef9 (diff) | |
download | FreeBSD-src-d9ad5313fd8fecf625cb947524ce3d56da1e7600.zip FreeBSD-src-d9ad5313fd8fecf625cb947524ce3d56da1e7600.tar.gz |
- Fix leak of struct nlminfo on process exit.
- Fix malloc type collision, that made the above problem
difficult to understand.
Reported by: Vladimir Sharun <sharun ukr.net>
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 347a484..25ca5b8 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -82,6 +82,9 @@ __FBSDID("$FreeBSD$"); /* Required to be non-static for SysVR4 emulator */ MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); +/* Hook for NFS teardown procedure. */ +void (*nlminfo_release_p)(struct proc *p); + /* * exit -- * Death of process. @@ -234,6 +237,12 @@ retry: funsetownlst(&p->p_sigiolst); /* + * If this process has an nlminfo data area (for lockd), release it + */ + if (nlminfo_release_p != NULL && p->p_nlminfo != NULL) + (*nlminfo_release_p)(p); + + /* * Close open files and release open-file table. * This may block! */ |