Fix crash when invalid parameter given
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 14 Nov 2018 10:13:11 +0000 (19:13 +0900)
committer장상윤/Tizen Platform Lab(SR)/Engineer/삼성전자 <jeremy.jang@samsung.com>
Wed, 14 Nov 2018 10:18:01 +0000 (19:18 +0900)
Change-Id: I958f11b27d06c2a9ba4f69a79398f02ded984cec
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/client.cc

index 7e64cb1..fa2030a 100644 (file)
@@ -651,7 +651,7 @@ API int capmgr_application_info_foreach_applications(
     const capmgr_device_h device,
     capmgr_application_info_foreach_app_cb cb,
     void* user_data) {
-  if (!cb)
+  if (!device || !cb)
     return CAPMGR_ERROR_INVALID_PARAMETER;
 
   std::unique_ptr<capmgr::SQLConnection> sql_conn(