summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
Diffstat (limited to 'dso')
-rw-r--r--dso/unix/dso.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index 6f09a0112..8892a7dff 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -72,6 +72,8 @@ ap_status_t ap_dso_load(ap_dso_handle_t **res_handle, const char *path,
void *os_handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
#endif
+ *res_handle = ap_pcalloc(ctx, sizeof(**res_handle));
+
if(os_handle == NULL) {
#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
(*res_handle)->errormsg = strerror(errno);
@@ -82,7 +84,6 @@ ap_status_t ap_dso_load(ap_dso_handle_t **res_handle, const char *path,
#endif
}
- *res_handle = ap_pcalloc(ctx, sizeof(**res_handle));
(*res_handle)->handle = (void*)os_handle;
(*res_handle)->cont = ctx;
(*res_handle)->errormsg = NULL;