/* Miscellaneous utilities.
- Copyright (C) 2019-2020 Free Software Foundation, Inc.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of libctf.
if (i->ctn_iter_fun == (void (*) (void)) ctf_dynhash_next_sorted)
free (i->u.ctn_sorted_hkv);
- if (i->ctn_iter_fun == (void (*) (void)) ctf_symbol_next
- && i->cu.ctn_fp->ctf_flags & LCTF_RDWR)
- ctf_next_destroy (i->u.ctn_next);
+ if (i->ctn_next)
+ ctf_next_destroy (i->ctn_next);
free (i);
}