diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2001-09-19 18:43:51 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2001-09-19 18:43:51 +0000 |
commit | 6b8cb73599b3f0f5778cc15593ac13968d705fa6 (patch) | |
tree | 6b04a05b31c38d0366ef596a54603ae2baa3f507 /dso | |
parent | 163fa1ef8fcb93afbf0d6b708c631656a58a1ebd (diff) | |
download | apr-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.c | 4 |
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); |