Quoting Bojan Smojver <[EMAIL PROTECTED]>:
Would that do it?
Like the attached, perhaps?
--
Bojan
Index: include/apr_dso.h
===================================================================
--- include/apr_dso.h (revision 432465)
+++ include/apr_dso.h (working copy)
@@ -50,9 +50,10 @@
/**
* Load a DSO library.
- * @param res_handle Location to store new handle for the DSO.
+ * @param res_handle Location to store new handle for the DSO (has to be
+ * already allocated if pool is NULL)
* @param path Path to the DSO library
- * @param ctx Pool to use.
+ * @param ctx Pool to use or NULL for none
* @bug We aught to provide an alternative to RTLD_GLOBAL, which
* is the only supported method of loading DSOs today.
*/
Index: dso/unix/dso.c
===================================================================
--- dso/unix/dso.c (revision 432465)
+++ dso/unix/dso.c (working copy)
@@ -140,7 +140,9 @@
#endif
#endif /* DSO_USE_x */
- *res_handle = apr_pcalloc(pool, sizeof(**res_handle));
+ if (pool) {
+ *res_handle = apr_pcalloc(pool, sizeof(**res_handle));
+ }
if(os_handle == NULL) {
#if defined(DSO_USE_SHL)
@@ -159,14 +161,22 @@
(*res_handle)->pool = pool;
(*res_handle)->errormsg = NULL;
- apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);
+ if (pool) {
+ apr_pool_cleanup_register(pool, *res_handle, dso_cleanup,
+ apr_pool_cleanup_null);
+ }
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
+ if (handle->pool) {
+ return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
+ }
+ else {
+ return APR_SUCCESS;
+ }
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,