]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: fix dict leak on archive-wide symbol lookup error path
authorNick Alcock <nick.alcock@oracle.com>
Wed, 12 Jun 2024 11:28:45 +0000 (12:28 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 18 Jun 2024 12:20:32 +0000 (13:20 +0100)
commite3cd5660756223bbe4a2ab607ef019bbf5e9daf9
tree484100f38a2d8f7dbaa18760261bd9f10e51e557
parent327356780ab4436b59b666a756323b8bda68cbd4
libctf: fix dict leak on archive-wide symbol lookup error path

If a lookup fails for a reason unrelated to a lack of type data for this
symbol, we return with an error; but we fail to close the dict we opened
most recently, which is leaked.

libctf/
* ctf-archive.c (ctf_arc_lookup_sym_or_name): Close dict.
libctf/ctf-archive.c