diff --git a/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc b/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc index 6a26dc35..0924e32e 100644 --- a/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javavm_test.cc @@ -18,8 +18,8 @@ JavaVMTest::JavaVMTest(std::string scriptCode, std::unique_ptr swigFactory) { - char* script_code = ::strdup(scriptCode.c_str()); - SWIGVMContainers::SWIGVM_params->script_code = script_code; + std::unique_ptr script_code = ::strdup(scriptCode.c_str()); + SWIGVMContainers::SWIGVM_params->script_code = script_code.get(); #ifndef USE_CTPG_PARSER std::unique_ptr parser = std::make_unique(std::move(swigFactory)); @@ -35,6 +35,5 @@ void JavaVMTest::run(std::string scriptCode, std::unique_ptr