diff options
Diffstat (limited to 'libctf/ctf-open.c')
-rw-r--r-- | libctf/ctf-open.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c index 4a95b7f..aedf390 100644 --- a/libctf/ctf-open.c +++ b/libctf/ctf-open.c @@ -1778,6 +1778,7 @@ ctf_import (ctf_file_t *fp, ctf_file_t *pfp) if (fp->ctf_parent != NULL) { + fp->ctf_parent->ctf_refcnt--; ctf_file_close (fp->ctf_parent); fp->ctf_parent = NULL; } @@ -1793,6 +1794,7 @@ ctf_import (ctf_file_t *fp, ctf_file_t *pfp) fp->ctf_flags |= LCTF_CHILD; pfp->ctf_refcnt++; } + fp->ctf_parent = pfp; return 0; } |