Fix a reference counting problem when using dlopen(NULL, ...).
PR: bin/12129
This commit is contained in:
parent
2be78ea16b
commit
3ff496fa33
@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: rtld.c,v 1.23 1999/04/22 01:54:38 jdp Exp $
|
||||
* $Id: rtld.c,v 1.24 1999/06/25 02:53:48 jdp Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1159,9 +1159,10 @@ dlopen(const char *name, int mode)
|
||||
|
||||
GDB_STATE(RT_ADD);
|
||||
|
||||
if (name == NULL)
|
||||
if (name == NULL) {
|
||||
obj = obj_main;
|
||||
else {
|
||||
obj->refcount++;
|
||||
} else {
|
||||
char *path = find_library(name, obj_main);
|
||||
if (path != NULL)
|
||||
obj = load_object(path);
|
||||
|
Loading…
Reference in New Issue
Block a user