Use std::vector<string> to get D-Bus object list
Replace std::array<const char*, N> with std::vector<std::string> to
retrieve the D-Bus object list, fixing the free-noheap-object CI error.
Change-Id: Ie48d691aee1a9f595439ad59e844e2a0857a2085
Signed-off-by: Anupama B R <anupama.b.r1@ibm.com>
diff --git a/vpd-manager/include/utility/vpd_specific_utility.hpp b/vpd-manager/include/utility/vpd_specific_utility.hpp
index acbc627..73cee0e 100644
--- a/vpd-manager/include/utility/vpd_specific_utility.hpp
+++ b/vpd-manager/include/utility/vpd_specific_utility.hpp
@@ -394,7 +394,7 @@
}
else
{
- std::array<const char*, 1> interfaceList = {kwdInterface.c_str()};
+ std::vector<std::string> interfaceList = {kwdInterface};
types::MapperGetObject mapperRetValue = dbusUtility::getObjectMap(
std::string(constants::systemVpdInvPath), interfaceList);
@@ -622,7 +622,7 @@
{
try
{
- std::array<const char*, 0> l_interfaces;
+ std::vector<std::string> l_interfaces;
const types::MapperGetObject& l_getObjectMap =
dbusUtility::getObjectMap(i_objectPath, l_interfaces);