Add missing nullptr check
Static analysis flags two missing nullptr checks. Add them.
Tested: dbus-rest is a deprecated option, so unit testing is the only
difference there.
Log services notify was added recently. Need help testing, otherwise
inspection only.
Change-Id: If92153ffa9c9fdf8903ce386f025ceebcf7510eb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 1892213..eb54899 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -1950,6 +1950,11 @@
while (propNode != nullptr)
{
const char* propertyName = propNode->Attribute("name");
+ if (propertyName == nullptr)
+ {
+ BMCWEB_LOG_DEBUG("Couldn't find name property");
+ continue;
+ }
BMCWEB_LOG_DEBUG("Found property {}", propertyName);
if (propertyName == transaction->propertyName)
{