]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: fix refcount leak in ctf_import
authorNick Alcock <nick.alcock@oracle.com>
Tue, 17 Sep 2019 05:59:31 +0000 (06:59 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 24 Sep 2019 13:06:32 +0000 (14:06 +0100)
commit6fa0bc1c30c6f099771d91c574cccbce5535ae75
treeb39accd740b56f0284a6d54b2a60434de76f9b71
parent2ca5b4ab8a02b17ac4ee4a6f8474c288cb3fbef9
libctf: fix refcount leak in ctf_import

Calling ctf_import (fp, NULL) to cancel out a pre-existing import leaked
the refcnt increment on the parent, so it could never be freed.

New in v4.

libctf/
* ctf-open.c (ctf_import): Do not leak a ctf_file_t ref on every
ctf_import after the first for a given file.
libctf/ChangeLog
libctf/ctf-open.c