From 74e57cf02883a9e1c34df3fd17d3293e98c1fae9 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:19:19 +0100 Subject: debian: T5003: Fixes for GCC in Debian 12 "Bookworm" Fixes compile error: void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function --- src/cstore/cstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cstore') diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index b9f68a2..4f19ebf 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -2901,7 +2901,7 @@ Cstore::validate_val(const tr1::shared_ptr& def, const char *value) #if __GNUC__ < 6 auto_ptr vbuf(strdup(value)); #else - unique_ptr vbuf(strdup(value)); + unique_ptr vbuf { strdup(value), &std::free }; #endif /* set the handle to be used during validate_value() for var ref -- cgit v1.2.3