summaryrefslogtreecommitdiffstats
path: root/crypto/dso
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2000-04-25 08:37:12 +0000
committerGeoff Thorpe <geoff@openssl.org>2000-04-25 08:37:12 +0000
commitebbaebf784b853a89d9779a79fa0ce0de3755262 (patch)
tree3efd9623a6e6af672ad1694f79bc1f9b41a4f686 /crypto/dso
parentda414db464cd7393ac8642dd1d285fd8be4a4c2a (diff)
This case in the "dso_unload" handlers should not be reported as an error -
if a DSO_load(NULL,...) operation fails, it will have to call DSO_free() on the DSO structure it created and that will filter through to this "unload" call. If the stack size is "< 1", then the library never actually loaded. To keep things clean higher up, I'll treat this as a vacuous case without an error. It makes the error stack easier to follow real world cases, and the error this ignores was only useful for catching bugs in internal code, not mismatched calls from applications (which should be handled in the generic DSO layer).
Diffstat (limited to 'crypto/dso')
-rw-r--r--crypto/dso/dso_dl.c5
-rw-r--r--crypto/dso/dso_dlfcn.c5
-rw-r--r--crypto/dso/dso_win32.c5
3 files changed, 3 insertions, 12 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c
index a4152e7723..bb808ad6fb 100644
--- a/crypto/dso/dso_dl.c
+++ b/crypto/dso/dso_dl.c
@@ -147,10 +147,7 @@ static int dl_unload(DSO *dso)
return(0);
}
if(sk_num(dso->meth_data) < 1)
- {
- DSOerr(DSO_F_DL_UNLOAD,DSO_R_STACK_ERROR);
- return(0);
- }
+ return(1);
/* Is this statement legal? */
ptr = (shl_t)sk_pop(dso->meth_data);
if(ptr == NULL)
diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c
index cad1aedd4e..7638724f78 100644
--- a/crypto/dso/dso_dlfcn.c
+++ b/crypto/dso/dso_dlfcn.c
@@ -152,10 +152,7 @@ static int dlfcn_unload(DSO *dso)
return(0);
}
if(sk_num(dso->meth_data) < 1)
- {
- DSOerr(DSO_F_DLFCN_UNLOAD,DSO_R_STACK_ERROR);
- return(0);
- }
+ return(1);
ptr = (void *)sk_pop(dso->meth_data);
if(ptr == NULL)
{
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index edf5d75b0f..2b1ab2177d 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -159,10 +159,7 @@ static int win32_unload(DSO *dso)
return(0);
}
if(sk_num(dso->meth_data) < 1)
- {
- DSOerr(DSO_F_WIN32_UNLOAD,DSO_R_STACK_ERROR);
- return(0);
- }
+ return(1);
p = (HINSTANCE *)sk_pop(dso->meth_data);
if(p == NULL)
{