summaryrefslogtreecommitdiff
path: root/ldso/libdl
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2002-06-05 18:40:46 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2002-06-05 18:40:46 +0000
commit1829481835c708c09894423438342b26447cceb3 (patch)
tree75f09a063bce7afa4e76a43cc0a138c16fceb875 /ldso/libdl
parent106caa4b6cd79a4a066a79fd55d9b6cafdc8a720 (diff)
Fix up of '_dlopen' call and removal of unneeded argument in call '_dl_load_elf_shared_library'.
Diffstat (limited to 'ldso/libdl')
-rw-r--r--ldso/libdl/dlib.c4
-rw-r--r--ldso/libdl/libdl.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/ldso/libdl/dlib.c b/ldso/libdl/dlib.c
index 5140ae28d..82ec50943 100644
--- a/ldso/libdl/dlib.c
+++ b/ldso/libdl/dlib.c
@@ -68,7 +68,7 @@ static void dl_cleanup(void)
void *_dlopen(const char *libname, int flag)
{
struct elf_resolve *tpnt, *tfrom;
- struct dyn_elf *rpnt;
+ struct dyn_elf *rpnt = NULL;
struct dyn_elf *dyn_chain;
struct dyn_elf *dpnt;
static int dl_init = 0;
@@ -115,7 +115,6 @@ void *_dlopen(const char *libname, int flag)
return NULL;
}
- tpnt->usage_count++;
dyn_chain = rpnt = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
_dl_memset(rpnt, 0, sizeof(*rpnt));
rpnt->dyn = tpnt;
@@ -151,7 +150,6 @@ void *_dlopen(const char *libname, int flag)
rpnt->next = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
_dl_memset (rpnt->next, 0, sizeof (*(rpnt->next)));
rpnt = rpnt->next;
- tpnt1->usage_count++;
if (!tpnt1->symbol_scope) tpnt1->symbol_scope = dyn_chain;
rpnt->dyn = tpnt1;
};
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 5140ae28d..82ec50943 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -68,7 +68,7 @@ static void dl_cleanup(void)
void *_dlopen(const char *libname, int flag)
{
struct elf_resolve *tpnt, *tfrom;
- struct dyn_elf *rpnt;
+ struct dyn_elf *rpnt = NULL;
struct dyn_elf *dyn_chain;
struct dyn_elf *dpnt;
static int dl_init = 0;
@@ -115,7 +115,6 @@ void *_dlopen(const char *libname, int flag)
return NULL;
}
- tpnt->usage_count++;
dyn_chain = rpnt = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
_dl_memset(rpnt, 0, sizeof(*rpnt));
rpnt->dyn = tpnt;
@@ -151,7 +150,6 @@ void *_dlopen(const char *libname, int flag)
rpnt->next = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
_dl_memset (rpnt->next, 0, sizeof (*(rpnt->next)));
rpnt = rpnt->next;
- tpnt1->usage_count++;
if (!tpnt1->symbol_scope) tpnt1->symbol_scope = dyn_chain;
rpnt->dyn = tpnt1;
};