Now maintains the new preloaded_image::id field.
If an image cannot be created out of a preloaded_image, its resources are freed now. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7531 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6e062dd1b5
commit
8590e919fc
@ -558,6 +558,9 @@ insert_preloaded_image(struct preloaded_image *preloadedImage)
|
||||
goto error2;
|
||||
|
||||
register_elf_image(image);
|
||||
preloadedImage->id = image->id;
|
||||
// modules_init() uses this information to get the preloaded images
|
||||
|
||||
return B_OK;
|
||||
|
||||
error2:
|
||||
@ -565,6 +568,11 @@ error2:
|
||||
error1:
|
||||
free(elfHeader);
|
||||
|
||||
// clean up preloaded image resources (this image won't be used anymore)
|
||||
delete_area(preloadedImage->text_region.id);
|
||||
delete_area(preloadedImage->data_region.id);
|
||||
preloadedImage->id = -1;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user