summaryrefslogtreecommitdiff
path: root/dso/beos/dso.c
diff options
context:
space:
mode:
Diffstat (limited to 'dso/beos/dso.c')
-rw-r--r--dso/beos/dso.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dso/beos/dso.c b/dso/beos/dso.c
index bb01d858c..4306db765 100644
--- a/dso/beos/dso.c
+++ b/dso/beos/dso.c
@@ -56,6 +56,12 @@
#if APR_HAS_DSO
+static apr_status_t dso_cleanup(void *thedso)
+{
+ apr_dso_handle_t *dso = thedso;
+ return apr_dso_unload(dso);
+}
+
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *path,
apr_pool_t *ctx)
{
@@ -67,6 +73,9 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
(*res_handle)->handle = newid;
(*res_handle)->cont = ctx;
+
+ apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+
return APR_SUCCESS;
}