summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-09-19 18:43:51 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-09-19 18:43:51 +0000
commit6b8cb73599b3f0f5778cc15593ac13968d705fa6 (patch)
tree6b04a05b31c38d0366ef596a54603ae2baa3f507 /dso
parent163fa1ef8fcb93afbf0d6b708c631656a58a1ebd (diff)
downloadapr-6b8cb73599b3f0f5778cc15593ac13968d705fa6.tar.gz
As pointed out by Mladen Turk <mturk@mappingsoft.com>, the Win9x case
never fixed the rv from apr_dso_load. Here's the leanest fix, along with assuring we have the pool context, even if all we return is an error result. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62346 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/win32/dso.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index e9775766c..8d6470740 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -119,16 +119,18 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
os_handle = LoadLibraryEx(path, NULL, 0);
if (!os_handle)
rv = apr_get_os_error();
+ else
+ rv = APR_SUCCESS;
SetErrorMode(em);
}
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
+ (*res_handle)->cont = ctx;
if (rv) {
return ((*res_handle)->load_error = rv);
}
(*res_handle)->handle = (void*)os_handle;
- (*res_handle)->cont = ctx;
(*res_handle)->load_error = APR_SUCCESS;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);