summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2017-06-22 13:51:34 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2017-06-22 13:51:34 -0400
commit5d686f126cdaec3d5a0728d66644893f6ac1e4b3 (patch)
treecfa9c16beeb8638b90081c179bb4173509a7bcd3
parentef91e367969fc78d9ab9e91fc17595a7e85c5075 (diff)
downloadsdl_core-hotfix/4.3-RC_coverity_fixes.tar.gz
Check return value for GetDeviceID
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 2fe6d1a257..ec8b36477c 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -472,8 +472,12 @@ void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id,
const bool is_allowed) {
POLICY_LIB_CHECK_VOID();
connection_handler::DeviceHandle device_handle;
- application_manager_.connection_handler().GetDeviceID(device_id,
- &device_handle);
+ if (!application_manager_.connection_handler().GetDeviceID(device_id,
+ &device_handle)) {
+ LOG4CXX_ERROR(logger_,
+ "Unable to get device handle for device_id: " << device_id);
+ return;
+ }
// In case of changed consent for device, related applications will be
// limited to pre_DataConsent permissions, if device disallowed, or switch
// back to their own permissions, if device allowed again, and must be