From 34bdffbf3e3c188027e767e631f717b10159316d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 2 Nov 2012 09:48:42 -0700 Subject: 3294 pfiles postmortem support Reviewed by: Robert Mustacchi Reviewed by: Richard Lowe Approved by: Eric Schrock --- usr/src/lib/libproc/common/Pcontrol.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'usr/src/lib/libproc/common/Pcontrol.c') 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 @@ -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); -- cgit v1.2.3