svn commit: r1926596 - /apr/apr-util/branches/1.7.x/misc/apu_dso.c
| Newsgroups | gmane.comp.apache.apr.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: minfrin
Date: Fri Jun 20 11:53:58 2025
New Revision: 1926596
URL: http://svn.apache.org/viewvc?rev=1926596&view=rev
Log:
Backport r1926595.
The apu_dso_load() function accepts a NULL dlhandleptr. Avoid
a segfault when we try load a module twice.
Modified:
apr/apr-util/branches/1.7.x/misc/apu_dso.c
Modified: apr/apr-util/branches/1.7.x/misc/apu_dso.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/misc/apu_dso.c?rev=1926596&r1=1926595&r2=1926596&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/misc/apu_dso.c (original)
+++ apr/apr-util/branches/1.7.x/misc/apu_dso.c Fri Jun 20 11:53:58 2025
@@ -147,7 +147,9 @@ apr_status_t apu_dso_load(apr_dso_handle
entry = apr_hash_get(dsos, module, APR_HASH_KEY_STRING);
if (entry) {
- *dlhandleptr = entry->handle;
+ if (dlhandleptr) {
+ *dlhandleptr = entry->handle;
+ }
*dsoptr = entry->sym;
return APR_EINIT;
}