* unload_elf_image() never unloaded any image because the ref_count
check was wrong (never gets below zero if everything goes as intended). * Removed erroneous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24232 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e5a5ee6eb8
commit
890c615aee
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||||
@ -684,8 +684,10 @@ elf_unlink_relocs(struct elf_image_info *image)
|
|||||||
static status_t
|
static status_t
|
||||||
unload_elf_image(struct elf_image_info *image)
|
unload_elf_image(struct elf_image_info *image)
|
||||||
{
|
{
|
||||||
if (atomic_add(&image->ref_count, -1) > 0)
|
if (atomic_add(&image->ref_count, -1) > 1)
|
||||||
return B_NO_ERROR;
|
return B_OK;
|
||||||
|
|
||||||
|
TRACE(("unload image %ld, %s\n", image->id, image->name));
|
||||||
|
|
||||||
//elf_unlink_relocs(image);
|
//elf_unlink_relocs(image);
|
||||||
// not yet used
|
// not yet used
|
||||||
|
Loading…
Reference in New Issue
Block a user