diff options
author | Garrett D'Amore <garrett@damore.org> | 2012-11-02 09:48:42 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2012-11-02 09:48:42 -0700 |
commit | 34bdffbf3e3c188027e767e631f717b10159316d (patch) | |
tree | 4d4e8a7b31cd6528275774fd378cdc6ef52661b4 /usr/src/lib/libproc/common/Pcontrol.c | |
parent | 70087ad34e224a679eb83e405bf394606ba94c1c (diff) | |
download | illumos-joyent-34bdffbf3e3c188027e767e631f717b10159316d.tar.gz |
3294 pfiles postmortem support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Eric Schrock <eric.schrock@delphix.com>
Diffstat (limited to 'usr/src/lib/libproc/common/Pcontrol.c')
-rw-r--r-- | usr/src/lib/libproc/common/Pcontrol.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/lib/libproc/common/Pcontrol.c b/usr/src/lib/libproc/common/Pcontrol.c index 2a32522e0c..1e7ce1556e 100644 --- a/usr/src/lib/libproc/common/Pcontrol.c +++ b/usr/src/lib/libproc/common/Pcontrol.c @@ -24,6 +24,7 @@ * Use is subject to license terms. * * Portions Copyright 2007 Chad Mynhier + * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. */ #include <assert.h> @@ -986,6 +987,13 @@ Pfree(struct ps_prochandle *P) } free(P->hashtab); } + + while (P->num_fd > 0) { + fd_info_t *fip = list_next(&P->fd_head); + list_unlink(fip); + free(fip); + P->num_fd--; + } (void) mutex_unlock(&P->proc_lock); (void) mutex_destroy(&P->proc_lock); |