diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2017-06-22 13:51:34 -0400 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2017-06-22 13:51:34 -0400 |
commit | 5d686f126cdaec3d5a0728d66644893f6ac1e4b3 (patch) | |
tree | cfa9c16beeb8638b90081c179bb4173509a7bcd3 | |
parent | ef91e367969fc78d9ab9e91fc17595a7e85c5075 (diff) | |
download | sdl_core-5d686f126cdaec3d5a0728d66644893f6ac1e4b3.tar.gz |
Fix for CID 171208hotfix/4.3-RC_coverity_fixes
Check return value for GetDeviceID
-rw-r--r-- | src/components/application_manager/src/policies/policy_handler.cc | 8 |
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 |