Skip to content

Commit a46a586

Browse files
committed
The apu_dso_load() function accepts a NULL dlhandleptr. Avoid
a segfault when we try load a module twice. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1926595 13f79535-47bb-0310-9956-ffa450edef68
1 parent 204e6a2 commit a46a586

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

util-misc/apu_dso.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ apr_status_t apu_dso_load(apr_dso_handle_t **dlhandleptr,
146146

147147
entry = apr_hash_get(dsos, module, APR_HASH_KEY_STRING);
148148
if (entry) {
149-
*dlhandleptr = entry->handle;
149+
if (dlhandleptr) {
150+
*dlhandleptr = entry->handle;
151+
}
150152
*dsoptr = entry->sym;
151153
return APR_EINIT;
152154
}

0 commit comments

Comments
 (0)