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:
@@ -2295,7 +2295,6 @@ err:
|
|||||||
status_t
|
status_t
|
||||||
unload_library(void* handle, image_id imageID, bool addOn)
|
unload_library(void* handle, image_id imageID, bool addOn)
|
||||||
{
|
{
|
||||||
status_t status = B_BAD_IMAGE_ID;
|
|
||||||
image_t *image;
|
image_t *image;
|
||||||
image_type type = addOn ? B_ADD_ON_IMAGE : B_LIBRARY_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
|
// we only check images that have been already initialized
|
||||||
|
|
||||||
|
status_t status = B_BAD_IMAGE_ID;
|
||||||
|
|
||||||
if (handle != NULL) {
|
if (handle != NULL) {
|
||||||
image = (image_t*)handle;
|
image = (image_t*)handle;
|
||||||
put_image(image);
|
put_image(image);
|
||||||
|
status = B_OK;
|
||||||
} else {
|
} else {
|
||||||
for (image = sLoadedImages.head; image; image = image->next) {
|
for (image = sLoadedImages.head; image; image = image->next) {
|
||||||
if (image->id == imageID) {
|
if (image->id == imageID) {
|
||||||
|
|||||||
Reference in New Issue
Block a user