From 78e503bc1d79bc4fc29bc9cbe1dfb68ae4d16acf Mon Sep 17 00:00:00 2001 From: наб Date: Tue, 12 Nov 2024 13:28:04 +0100 Subject: Turn unique_ptr into real deleter types (warnings now, UB in C++20) --- apt-pkg/acquire-item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index b534d56a3..3016dad59 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -4065,7 +4065,7 @@ static std::string GetAuxFileNameFromURIInLists(std::string const &uri) auto const dirname = flCombine(_config->FindDir("Dir::State::lists"), "auxfiles/"); char const * const filetag = ".apt-acquire-privs-test.XXXXXX"; std::string const tmpfile_tpl = flCombine(dirname, filetag); - std::unique_ptr tmpfile { strdup(tmpfile_tpl.c_str()), std::free }; + std::unique_ptr tmpfile { strdup(tmpfile_tpl.c_str()) }; int const fd = mkstemp(tmpfile.get()); if (fd == -1) return ""; @@ -4081,7 +4081,7 @@ static std::string GetAuxFileNameFromURI(std::string const &uri) std::string tmpdir_tpl; strprintf(tmpdir_tpl, "%s/apt-auxfiles-XXXXXX", GetTempDir().c_str()); - std::unique_ptr tmpdir { strndup(tmpdir_tpl.data(), tmpdir_tpl.length()), std::free }; + std::unique_ptr tmpdir { strndup(tmpdir_tpl.data(), tmpdir_tpl.length()) }; if (mkdtemp(tmpdir.get()) == nullptr) { _error->Errno("GetAuxFileNameFromURI", "mkdtemp of %s failed", tmpdir.get()); -- cgit v1.2.3-70-g09d2