From 9ea4bb8fc79b69e18187cd4c1f5b97239c180a90 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 5 Aug 2019 13:48:14 +0100 Subject: [PATCH] ecore evas drm - fix multi-dlopening of lib into symbol space only load libglapi once... not multiple times by storing static ptr to lib handle. fix CID 1402692 --- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index a843f26589..7669fee535 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -1136,7 +1136,9 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, EAPI Ecore_Evas * ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h) { - dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); + static void *libglapi = NULL; + + if (!libglapi) libglapi = dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); if (dlerror()) return NULL; return _ecore_evas_new_internal(device, x, y, w, h, EINA_TRUE);