Fix indentation in print_thread_info_1
[deliverable/binutils-gdb.git] / libctf / ctf-open.c
index 4a95b7f38a5a33968bb3e7a47c535d1564784c31..64081464425193b15314b69e4b360ffc78e6611b 100644 (file)
@@ -1,5 +1,5 @@
 /* Opening CTF files.
-   Copyright (C) 2019 Free Software Foundation, Inc.
+   Copyright (C) 2019-2020 Free Software Foundation, Inc.
 
    This file is part of libctf.
 
@@ -1542,8 +1542,8 @@ ctf_bufopen_internal (const ctf_sect_t *ctfsect, const ctf_sect_t *symsect,
       (err = flip_ctf (hp, fp->ctf_buf)) != 0)
     {
       /* We can be certain that flip_ctf() will have endian-flipped everything
-         other than the types table when we return.  In particular the header
-         is fine, so set it, to allow freeing to use the usual code path.  */
+        other than the types table when we return.  In particular the header
+        is fine, so set it, to allow freeing to use the usual code path.  */
 
       ctf_set_base (fp, hp, fp->ctf_base);
       goto bad;
@@ -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;
 }
This page took 0.02373 seconds and 4 git commands to generate.