From 759a38d14469ce3e4f7ad283307533e869fd9af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 5 Oct 2005 16:41:04 +0000 Subject: [PATCH] load_kernel_add_on() leaked FDs in case the image was already loaded. And that was causing bug #50 (which is fixed now). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14305 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system/kernel/elf.c b/src/system/kernel/elf.c index a35af31b39..2af6bbd51e 100644 --- a/src/system/kernel/elf.c +++ b/src/system/kernel/elf.c @@ -1382,11 +1382,10 @@ load_kernel_add_on(const char *path) load_elf_symbol_table(fd, image); free(pheaders); - _kern_close(fd); - register_elf_image(image); done: + _kern_close(fd); mutex_unlock(&sImageLoadMutex); return image->id;