libctf: actually close bfds we have opened
authorNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jul 2019 16:02:48 +0000 (17:02 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:55 +0000 (17:04 +0100)
commitf046147d59aab0c8b6f00cd182f34b42ac8915e8
treecfde61dd0d3715ea17ba5be78ea650677452c0a3
parentedc8bbe90b82f1fa4f3f261b5c97503867e9aba4
libctf: actually close bfds we have opened

When we do a ctf_fdopen, we open things via bfd_fdopenr and set up a
hook to close the bfd again... but then we never actually call that hook
from anywhere, so we eventually leak every bfd we open.

Fix this by calling the hook (if set) in ctf_arc_close.

New in v3.

libctf/
* ctf-archive.c (ctf_arc_close): Call ctfi_bfd_close if set.
* ctf-open-bfd.c (ctf_bfdclose): Fix comment.
libctf/ChangeLog
libctf/ctf-archive.c
libctf/ctf-open-bfd.c
This page took 0.035705 seconds and 4 git commands to generate.