diff options
Diffstat (limited to 'libctf/ctf-util.c')
-rw-r--r-- | libctf/ctf-util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libctf/ctf-util.c b/libctf/ctf-util.c index 879ebbf..4f126ba 100644 --- a/libctf/ctf-util.c +++ b/libctf/ctf-util.c @@ -283,9 +283,8 @@ ctf_next_destroy (ctf_next_t *i) 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); } |