diff options
author | George Liu <liuxiwei@inspur.com> | 2020-08-26 09:21:10 +0300 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2020-08-27 19:42:37 +0300 |
commit | ebd459060ea4f42761402dd54acd0962c36136c2 (patch) | |
tree | 61f0255c5af53bf11bf490ab7bc1f5592382bc31 /redfish-core/lib/log_services.hpp | |
parent | f5b16f030f1fd67412c7d279e79b58ffc5e36f67 (diff) | |
download | bmcweb-ebd459060ea4f42761402dd54acd0962c36136c2.tar.xz |
Fix potential null pointer dereference
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibeedbe61fa1575af2599c63e6513ddb7d1feff58
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r-- | redfish-core/lib/log_services.hpp | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index 7be934e82b..c96a297d3a 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp @@ -1462,8 +1462,11 @@ class DBusEventLogEntryCollection : public Node { messages::internalError(asyncResp->res); } - timestamp = crow::utility::getTimestamp( - *millisTimeStamp); + else + { + timestamp = crow::utility::getTimestamp( + *millisTimeStamp); + } } else if (propertyMap.first == "UpdateTimestamp") { @@ -1473,8 +1476,12 @@ class DBusEventLogEntryCollection : public Node { messages::internalError(asyncResp->res); } - updateTimestamp = crow::utility::getTimestamp( - *millisTimeStamp); + else + { + updateTimestamp = + crow::utility::getTimestamp( + *millisTimeStamp); + } } else if (propertyMap.first == "Severity") { @@ -1590,8 +1597,11 @@ class DBusEventLogEntry : public Node { messages::internalError(asyncResp->res); } - timestamp = - crow::utility::getTimestamp(*millisTimeStamp); + else + { + timestamp = + crow::utility::getTimestamp(*millisTimeStamp); + } } else if (propertyMap.first == "UpdateTimestamp") { @@ -1601,8 +1611,11 @@ class DBusEventLogEntry : public Node { messages::internalError(asyncResp->res); } - updateTimestamp = - crow::utility::getTimestamp(*millisTimeStamp); + else + { + updateTimestamp = + crow::utility::getTimestamp(*millisTimeStamp); + } } else if (propertyMap.first == "Severity") { |