svn commit: r1926596 - /apr/apr-util/branches/1.7.x/misc/apu_dso.c

[email protected]
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;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.