Merge "Fixing issues found by prevent2 (49866)"
authorPawel Sikorski <p.sikorski@samsung.com>
Thu, 25 Apr 2013 12:11:35 +0000 (21:11 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 25 Apr 2013 12:11:35 +0000 (21:11 +0900)
src/jobs/plugin_install/plugin_install_task.cpp

index 4c87f62..65333ba 100644 (file)
@@ -187,9 +187,10 @@ void PluginInstallTask::stepLoadPluginLibrary()
 
     void *dlHandle = dlopen(filename.c_str(), RTLD_LAZY);
     if (dlHandle == NULL) {
+        const char* error = (const char*)dlerror();
         LogError(
             "Failed to load plugin: " << filename <<
-            ". Reason: " << (dlerror() != NULL ? dlerror() : "unknown"));
+            ". Reason: " << (error != NULL ? error : "unknown"));
         ThrowMsg(Exceptions::PluginLibraryError, "Library error");
     }