Fix static analysis issue
authorIlho Kim <ilho159.kim@samsung.com>
Wed, 3 Mar 2021 07:29:05 +0000 (16:29 +0900)
committer김일호/Tizen Platform Lab(SR)/Engineer/삼성전자 <ilho159.kim@samsung.com>
Wed, 3 Mar 2021 10:27:40 +0000 (19:27 +0900)
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/common/database/query_handler.cc

index 7764412..197b4d3 100644 (file)
@@ -70,6 +70,9 @@ bool QueryHandler::Execute() {
     result_.clear();
     result_.resize(1);
     const char **queries = (const char **)calloc(query_.size(), sizeof(char *));
+    if (queries == nullptr)
+      return false;
+
     int i = 0;
     for (const auto& query : query_)
       queries[i++] = query.c_str();