diff options
Diffstat (limited to 'libctf/ctf-create.c')
-rw-r--r-- | libctf/ctf-create.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index e0fce13..e1afefe 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -288,11 +288,11 @@ ctf_dtd_delete (ctf_dict_t *fp, ctf_dtdef_t *dtd) dtd->dtd_vlen_alloc = 0; if (dtd->dtd_data.ctt_name - && (name = ctf_strraw (fp, dtd->dtd_data.ctt_name)) != NULL - && LCTF_INFO_ISROOT (fp, dtd->dtd_data.ctt_info)) + && (name = ctf_strraw (fp, dtd->dtd_data.ctt_name)) != NULL) { - ctf_dynhash_remove (ctf_name_table (fp, name_kind)->ctn_writable, - name); + if (LCTF_INFO_ISROOT (fp, dtd->dtd_data.ctt_info)) + ctf_dynhash_remove (ctf_name_table (fp, name_kind)->ctn_writable, + name); ctf_str_remove_ref (fp, name, &dtd->dtd_data.ctt_name); } |