Fix dlclose issue when calling DLP feature 49/158549/1 accepted/tizen/unified/20171107.055246 submit/tizen/20171106.060918
authortizen <s.moraes@samsung.com>
Wed, 1 Nov 2017 18:08:44 +0000 (16:08 -0200)
committertizen <s.moraes@samsung.com>
Wed, 1 Nov 2017 18:08:44 +0000 (16:08 -0200)
Change-Id: Id84c9f70c250b3798b4c2b730a45f817b5341c2a
Signed-off-by: tizen <s.moraes@samsung.com>
extensions/tizen_dlp.c
lib/extensions/curl_extensions.c

index 81ffa4c..200bce0 100644 (file)
@@ -19,7 +19,7 @@ static void (*privacy_guard_dlp_check_leak)(const char *, char * const, size_t)
 void tizen_dlp_init(void)
 {
     if (first_run) {
-        void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY);
+        void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY|RTLD_NODELETE);
         if (handle) {
             privacy_guard_dlp_init = dlsym(handle, "privacy_guard_dlp_init");
             privacy_guard_dlp_check_leak = dlsym(handle, "privacy_guard_dlp_check_leak");
index a61d9f3..a0c9fdd 100644 (file)
@@ -44,7 +44,7 @@ static void (*tizen_dlp_check_leak)(const char *, char * const, size_t) = NULL;
 static void curl_extensions_init(void)
 {
     if (first_run) {
-        void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY);
+        void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY|RTLD_NODELETE);
         if (handle) {
             tizen_dlp_init = dlsym(handle, "tizen_dlp_init");
             tizen_dlp_check_leak = dlsym(handle, "tizen_dlp_check_leak");