diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-19 18:43:51 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-19 18:43:51 +0000 |
commit | 25de7e9be7fa234c441cec2c7b20843440e3117f (patch) | |
tree | 6b04a05b31c38d0366ef596a54603ae2baa3f507 /dso | |
parent | 1f1d8c239a9bb7f68938684e6fd46849390fd47a (diff) | |
download | libapr-25de7e9be7fa234c441cec2c7b20843440e3117f.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: http://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); |