* [GAM-74] resolving issues found by coverity scan
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / src / CAmRoutingSender.cpp
index b6279a7..050ff45 100644 (file)
@@ -113,6 +113,7 @@ CAmRoutingSender::CAmRoutingSender(const std::vector<std::string>& listOfPluginD
         if (!router)
         {
             logError("RoutingSender::RoutingSender RoutingPlugin initialization failed. Entry Function not callable");
+            dlclose(tempLibHandle);
             continue;
         }
 
@@ -128,6 +129,7 @@ CAmRoutingSender::CAmRoutingSender(const std::vector<std::string>& listOfPluginD
         if (majorVersion < REQUIRED_INTERFACE_VERSION_MAJOR || ((majorVersion == REQUIRED_INTERFACE_VERSION_MAJOR) && (minorVersion > REQUIRED_INTERFACE_VERSION_MINOR)))
         {
             logInfo("RoutingPlugin initialization failed. Version of Interface to old");
+            dlclose(tempLibHandle);
             continue;
         }