diff options
Diffstat (limited to 'lib/libdtrace/common/dt_cc.c')
-rw-r--r-- | lib/libdtrace/common/dt_cc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libdtrace/common/dt_cc.c b/lib/libdtrace/common/dt_cc.c index 575fb9c68367..24a386bbde95 100644 --- a/lib/libdtrace/common/dt_cc.c +++ b/lib/libdtrace/common/dt_cc.c @@ -20,12 +20,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * DTrace D Language Compiler * @@ -2069,11 +2066,11 @@ dt_compile(dtrace_hdl_t *dtp, int context, dtrace_probespec_t pspec, void *arg, if (dt_list_next(&dtp->dt_lib_path) != NULL && dt_load_libs(dtp) != 0) return (NULL); /* errno is set for us */ - (void) ctf_discard(dtp->dt_cdefs->dm_ctfp); - (void) ctf_discard(dtp->dt_ddefs->dm_ctfp); + if (dtp->dt_globals->dh_nelems != 0) + (void) dt_idhash_iter(dtp->dt_globals, dt_idreset, NULL); - (void) dt_idhash_iter(dtp->dt_globals, dt_idreset, NULL); - (void) dt_idhash_iter(dtp->dt_tls, dt_idreset, NULL); + if (dtp->dt_tls->dh_nelems != 0) + (void) dt_idhash_iter(dtp->dt_tls, dt_idreset, NULL); if (fp && (cflags & DTRACE_C_CPP) && (fp = dt_preproc(dtp, fp)) == NULL) return (NULL); /* errno is set for us */ |