diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 71aa134348..27ec564cf9 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1870,7 +1870,7 @@ bool HandleDownloadCommand(std::vector const& args, } std::string algo = i->substr(0, pos); expectedHash = cmSystemTools::LowerCase(i->substr(pos + 1)); - hash = std::unique_ptr(cmCryptoHash::New(algo)); + hash = cmCryptoHash::New(algo); if (!hash) { std::string err = cmStrCat("DOWNLOAD EXPECTED_HASH given unknown ALGO: ", algo);