summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/src/test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gentoobrowse/src/test.cpp b/gentoobrowse/src/test.cpp
index 98dec8d..450239d 100644
--- a/gentoobrowse/src/test.cpp
+++ b/gentoobrowse/src/test.cpp
@@ -51,8 +51,9 @@ public:
standardAssertions(const char * name) override
{
BOOST_TEST_CONTEXT(__FUNCTION__ << " : " << name) {
- auto realname = abi::__cxa_demangle(name, 0, 0, nullptr);
- const auto outputPath {(binDir / realname).replace_extension(".html")};
+ auto realname
+ = std::unique_ptr<char, decltype(&std::free)> {abi::__cxa_demangle(name, 0, 0, nullptr), std::free};
+ const auto outputPath {(binDir / realname.get()).replace_extension(".html")};
std::ofstream {outputPath} << (output.str());
auto h = getResponseHeaders();