From 46d8228e36ec98f94bed90828d8fe52010490c0e Mon Sep 17 00:00:00 2001 From: dillon Date: Mon, 10 Jun 2002 21:15:50 +0000 Subject: Correct a bug in the last commit. The whole point of creating a 'done:' goto target was so the cache could be freed. So free the cache after done: rather then before done: (!) Submitted by: Gavin Atkinson --- libexec/rtld-elf/amd64/reloc.c | 6 +++--- libexec/rtld-elf/i386/reloc.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index c306a84..f3425eb 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -211,11 +211,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) goto done; } } + r = 0; +done: if (cache) munmap(cache, bytes); - r = 0; -done: - return(r); + return(r); } /* Process the PLT relocations. */ diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index c306a84..f3425eb 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -211,11 +211,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) goto done; } } + r = 0; +done: if (cache) munmap(cache, bytes); - r = 0; -done: - return(r); + return(r); } /* Process the PLT relocations. */ -- cgit v1.1