diff --git a/src/log/logd/lgs_imm.cc b/src/log/logd/lgs_imm.cc
index 84411fc0e..2969bd2ef 100644
--- a/src/log/logd/lgs_imm.cc
+++ b/src/log/logd/lgs_imm.cc
@@ -85,7 +85,14 @@ static const SaImmClassNameT streamConfig_str =
 // The list contains path-file names when validating its name in CCB completed
 // callback. This help for log service prevents that creating any streams
 // in same CCB with duplicated log path-file name
+// [Lennart] Why a vector of pointers to strings? Should be a vector of strings
+// See also comment where the list is cleaned
+#if 0  // Old code
 std::vector<std::string *> file_path_list;
+#endif
+// Replace with:
+std::vector<std::string> file_path_list;
+
 
 /* FUNCTIONS
  * ---------
@@ -1105,14 +1112,28 @@ static bool check_duplicated_file_path(
 
   TRACE("Check if filename and pathname are duplicated");
 
+#if 0  // Old code
   // Check if any streams in the same CCB has given filename and pathname
   for (auto file_path : file_path_list) {
     if (*file_path == (i_pathName + i_fileName)) {
       return true;
     }
   }
+  // [Lennart] If file_path_list is a vector of strings this construction is
+  // not needed. Just push_back(i_pathName + i_fileName)
   std::string *file_path_name = new std::string(i_pathName + i_fileName);
   file_path_list.push_back(file_path_name);
+#endif
+
+  // [Lennart] The code above could look something like the following instead:
+  // Note that allocating memory with new is not needed
+  std::string tmp_str = i_pathName + i_fileName;
+  for (auto& file_path : file_path_list) {
+    if ( file_path == tmp_str) {
+      return true;
+    }
+  }
+  file_path_list.push_back(tmp_str);
 
   // Check if any current streams has given filename and pathname
   SaBoolT endloop = SA_FALSE, jstart = SA_TRUE;
@@ -1884,11 +1905,17 @@ static SaAisErrorT ccbCompletedCallback(SaImmOiHandleT immOiHandle,
   }
 
   // Deleting all elements in "file_path_list" list
+#if 0
   for (auto it = file_path_list.begin(); it != file_path_list.end();) {
     std::string *name = *it;
     it = file_path_list.erase(it);
     delete name;
   }
+#endif
+
+  // [Lennart] If file_path_list is a vector of strings the code above could be
+  // replaced by:
+  file_path_list.clear();
 
 done:
   /*
