diff options
author | Robert Mustacchi <rm@joyent.com> | 2013-04-03 15:25:37 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-08-16 09:30:57 -0700 |
commit | 0a47c91c895e274dd0990009919e30e984364a8b (patch) | |
tree | 4825f16ea90a8ccaf86fd40b01fb6e03f5be970d /usr/src/common/ctf/ctf_open.c | |
parent | 494f7e12a62129ef191a15f9dfde6b7abe3bf510 (diff) | |
download | illumos-joyent-0a47c91c895e274dd0990009919e30e984364a8b.tar.gz |
3089 want ::typedef
3690 mdb on x86 should be able to print alternate register names
3688 Want mdb -e
3094 libctf should support removing a dynamic type
3095 libctf does not validate arrays correctly
3096 libctf does not validate function types correctly
3689 Want an mdb test suite driver
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/common/ctf/ctf_open.c')
-rw-r--r-- | usr/src/common/ctf/ctf_open.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/src/common/ctf/ctf_open.c b/usr/src/common/ctf/ctf_open.c index e49a4cb329..2148389fff 100644 --- a/usr/src/common/ctf/ctf_open.c +++ b/usr/src/common/ctf/ctf_open.c @@ -24,8 +24,9 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + */ #include <ctf_impl.h> #include <sys/mman.h> @@ -810,8 +811,12 @@ ctf_close(ctf_file_t *fp) if (fp->ctf_parent != NULL) ctf_close(fp->ctf_parent); - for (dtd = ctf_list_next(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) { - ntd = ctf_list_next(dtd); + /* + * Note, to work properly with reference counting on the dynamic + * section, we must delete the list in reverse. + */ + for (dtd = ctf_list_prev(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) { + ntd = ctf_list_prev(dtd); ctf_dtd_delete(fp, dtd); } |