From: Heather McIntyre Date: Tue, 10 Oct 2023 11:16:03 +0000 (+0200) Subject: libelf: Fix elf_end deadlock X-Git-Tag: elfutils-0.190~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10aa68e6ed13772e520f1bc2dac3dd6e07d8991c;p=thirdparty%2Felfutils.git libelf: Fix elf_end deadlock * libelf/elf_end.c (elf_end): Add rwlock_unlock before early return. Signed-off-by: Heather S. McIntyre Signed-off-by: Mark Wielaard --- diff --git a/libelf/elf_end.c b/libelf/elf_end.c index 89727cb31..80f4d13fa 100644 --- a/libelf/elf_end.c +++ b/libelf/elf_end.c @@ -82,7 +82,10 @@ elf_end (Elf *elf) elf->state.ar.ar_sym = NULL; if (elf->state.ar.children != NULL) - return 0; + { + rwlock_unlock(elf->lock); + return 0; + } } /* Remove this structure from the children list. */