elf: Fix memory leak in _dl_find_object_update (bug 29062)
authorFlorian Weimer <fweimer@redhat.com>
Wed, 13 Apr 2022 12:18:28 +0000 (14:18 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 13 Apr 2022 12:19:04 +0000 (14:19 +0200)
commit4a41fc3cd9cea9223ea4f13f9c766a1e149a0ccc
tree363f7e95486faf2135e589cfcf2236f540853572
parent45a8e05785a617683bbaf83f756cada7a4a425b9
elf: Fix memory leak in _dl_find_object_update (bug 29062)

The count can be zero if an object has already been loaded as
an indirect dependency (so that l_searchlist.r_list in its link
map is still NULL) is promoted to global scope via RTLD_GLOBAL.

Fixes commit 5d28a8962dc ("elf: Add _dl_find_object function").
elf/dl-find_object.c