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
This commit is contained in:
Axel Dörfler 2005-10-05 16:41:04 +00:00
parent 333735e881
commit 759a38d144

View File

@ -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;