]> git.cworth.org Git - fips/blobdiff - dlwrap.c
dlwrap: Fix dlwrap_real_dlopen to only perform dlsym-lookup once
[fips] / dlwrap.c
index 0c57f752bdf039ac2f3e15b22e62e595884f887e..aac06f6eda22a663643bd49a0397a4700862a993 100644 (file)
--- a/dlwrap.c
+++ b/dlwrap.c
@@ -62,7 +62,7 @@ dlopen (const char *filename, int flag)
 void *
 dlwrap_real_dlopen (const char *filename, int flag)
 {
-       fips_dlopen_t real_dlopen = NULL;
+       static fips_dlopen_t real_dlopen = NULL;
 
        if (! real_dlopen) {
                real_dlopen = (fips_dlopen_t) dlwrap_real_dlsym (RTLD_NEXT, "dlopen");