- Fix COMPARE_RESULT_OF_NEW
- Using std::nothrow when allocate object
Change-Id: I85196db63f6e60fb802022f1665511effc20688d
Signed-off-by: Jihoi Kim <jihoi.kim@samsung.com>
}
std::shared_ptr<Request> Request::Builder::Build() {
- auto req =
- std::shared_ptr<Request>(new Request(pid_, uid_, cmd_, opt_));
+ auto req = std::shared_ptr<Request>(
+ new (std::nothrow) Request(pid_, uid_, cmd_, opt_));
std::string start_time;
timespec start{};
+
+ if (req == nullptr)
+ return nullptr;
+
if (b_ != nullptr)
start_time = b_->GetString(AUL_K_STARTTIME);