Add function call to clear memory db
[platform/core/appfw/app-installers.git] / src / common / installer_runner.cc
index a5f8646..c98432f 100644 (file)
@@ -85,12 +85,12 @@ AppInstaller::Result InstallerRunner::Run() {
       break;
   }
   if (it != installers_.end() && result == AppInstaller::Result::ERROR) {
+    pkgmgr_parser_clear_cache_memory_db();
     do {
       AppInstaller::Result ret = (*it)->Undo();
       if (ret != AppInstaller::Result::OK && ret != AppInstaller::Result::ERROR)
         result = AppInstaller::Result::UNDO_ERROR;
     } while (it-- != installers_.begin());
-    pkgmgr_parser_clear_cache_memory_db();
   } else {
     pkgmgr_parser_clear_cache_memory_db();
     if (pkgmgr_->GetRequestType() != RequestType::Recovery)