unload_library() invoked from dlclose() might not have deleted images

correctly and it returned an error on success.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28578 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-11-09 18:18:51 +00:00
parent f0125931b4
commit df30098d91

View File

@ -2295,7 +2295,6 @@ err:
status_t
unload_library(void* handle, image_id imageID, bool addOn)
{
status_t status = B_BAD_IMAGE_ID;
image_t *image;
image_type type = addOn ? B_ADD_ON_IMAGE : B_LIBRARY_IMAGE;
@ -2315,9 +2314,12 @@ unload_library(void* handle, image_id imageID, bool addOn)
// we only check images that have been already initialized
status_t status = B_BAD_IMAGE_ID;
if (handle != NULL) {
image = (image_t*)handle;
put_image(image);
status = B_OK;
} else {
for (image = sLoadedImages.head; image; image = image->next) {
if (image->id == imageID) {