diff --git a/modules/third_party/statcollect/StatCollect.cpp b/modules/third_party/statcollect/StatCollect.cpp index d3cbfc3960..b9a1ad292a 100644 --- a/modules/third_party/statcollect/StatCollect.cpp +++ b/modules/third_party/statcollect/StatCollect.cpp @@ -207,7 +207,7 @@ namespace StatCollect { totalSamplesReceived, concealedSamples, concealmentEvents); - std::string* tempStrPrt = &collectInfoJson; + std::string* tempStrPrt = new std::string(collectInfoJson); resultPtr = static_cast(tempStrPrt); } else {