From ad04f4e5a300b08cd7356d15725d84d34f152a07 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 30 May 2013 12:55:26 -0700 Subject: [PATCH] dlwrap: Fix dlwrap_real_dlopen to only perform dlsym-lookup once Making the real_dlopen variable static means that we perform the dlysm lookup only once and then re-use the result for later calls. This is what was always intended for this code. --- dlwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlwrap.c b/dlwrap.c index 0c57f75..aac06f6 100644 --- 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"); -- 2.43.0