This commit fixes SVACE issue with WGID: 449860
[Verification] tct-notification-tizen-tests (auto): 100% pass rate
(The CommonNotification::SetAppControlInfoFrmJson function that was
changed, was called several times during tests)
Change-Id: If1caa5d141edb6c776a49ee9c2bfa5abc575efab
const std::string key = FromJson<std::string>(obj, "key");
const picojson::array values = FromJson<picojson::array>(obj, "value");
const char** arrayValue = (const char**)calloc(sizeof(char*), values.size());
+
+ if (!arrayValue) {
+ return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Set application control error",
+ ("Memory allocation failed"));
+ }
+
SCOPE_EXIT {
free(arrayValue);
};