From 10aa68e6ed13772e520f1bc2dac3dd6e07d8991c Mon Sep 17 00:00:00 2001 From: Heather McIntyre Date: Tue, 10 Oct 2023 13:16:03 +0200 Subject: [PATCH] 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 --- libelf/elf_end.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. */ -- 2.47.3