From 1829481835c708c09894423438342b26447cceb3 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Wed, 5 Jun 2002 18:40:46 +0000 Subject: Fix up of '_dlopen' call and removal of unneeded argument in call '_dl_load_elf_shared_library'. --- ldso/libdl/dlib.c | 4 +--- ldso/libdl/libdl.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'ldso/libdl') 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; }; -- cgit v1.2.3