diff --git a/src/meta/test/JobManagerTest.cpp b/src/meta/test/JobManagerTest.cpp index e0e677739fe..4587e1758ed 100644 --- a/src/meta/test/JobManagerTest.cpp +++ b/src/meta/test/JobManagerTest.cpp @@ -137,8 +137,8 @@ TEST_F(JobManagerTest, DownloadJob) { EXPECT_CALL(adminClient, addTask(_, _, _, _, _, _, _)) .WillOnce(Return(ByMove(folly::makeFuture(Status::OK())))); - auto executor = - new DownloadJobExecutor(space, job.getJobId(), kv.get(), &adminClient, job.getParas()); + auto executor = std::make_unique( + space, job.getJobId(), kv.get(), &adminClient, job.getParas()); executor->helper_ = std::make_unique(); ASSERT_TRUE(executor->check()); @@ -162,8 +162,8 @@ TEST_F(JobManagerTest, IngestJob) { MockAdminClient adminClient; EXPECT_CALL(adminClient, addTask(_, _, _, _, _, _, _)) .WillOnce(Return(ByMove(folly::makeFuture(Status::OK())))); - auto executor = - new IngestJobExecutor(space, job.getJobId(), kv.get(), &adminClient, job.getParas()); + auto executor = std::make_unique( + space, job.getJobId(), kv.get(), &adminClient, job.getParas()); ASSERT_TRUE(executor->check()); auto code = executor->prepare(); diff --git a/src/parser/parser.yy b/src/parser/parser.yy index 9147a668c30..7c5d7b7aa90 100644 --- a/src/parser/parser.yy +++ b/src/parser/parser.yy @@ -3241,6 +3241,7 @@ download_sentence meta::cpp2::JobType::DOWNLOAD); sentence->addPara(*$3); $$ = sentence; + delete $3; } ; @@ -3280,6 +3281,7 @@ admin_job_sentence meta::cpp2::JobType::DOWNLOAD); sentence->addPara(*$5); $$ = sentence; + delete($5); } | KW_SUBMIT KW_JOB KW_INGEST { auto sentence = new AdminJobSentence(meta::cpp2::JobOp::ADD,