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/contrib/strutl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/strutl.cc') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 3689dc17a..ec61c7e2b 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1421,7 +1421,7 @@ unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin, and to allow reordering of parameters */ bool iovprintf(std::ostream &out, const char *format, va_list &args, ssize_t &size) { - auto S = std::unique_ptr{static_cast(malloc(size)), &free}; + auto S = std::unique_ptr{static_cast(malloc(size))}; ssize_t const n = vsnprintf(S.get(), size, format, args); if (n > -1 && n < size) { out << S.get(); -- cgit v1.2.3-70-g09d2