diff options
Diffstat (limited to 'usr/src/uts/common/os/lwp.c')
-rw-r--r-- | usr/src/uts/common/os/lwp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/uts/common/os/lwp.c b/usr/src/uts/common/os/lwp.c index 64c541187d..6d518e1aae 100644 --- a/usr/src/uts/common/os/lwp.c +++ b/usr/src/uts/common/os/lwp.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ + #include <sys/param.h> #include <sys/types.h> #include <sys/sysmacros.h> @@ -995,6 +999,15 @@ lwp_exit(void) lwp->lwp_curinfo = NULL; } + /* + * If we have spymaster information (that is, if we're an agent LWP), + * free that now. + */ + if (lwp->lwp_spymaster != NULL) { + kmem_free(lwp->lwp_spymaster, sizeof (psinfo_t)); + lwp->lwp_spymaster = NULL; + } + thread_rele(t); /* |