From 64de386aea724126e70c5186fe5e0166e0a79d35 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jan 2018 14:22:49 +0100 Subject: Fix mismatched malloc/delete --- ingen/filesystem.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ingen/filesystem.hpp b/ingen/filesystem.hpp index 19fa74b2..5c7d7568 100644 --- a/ingen/filesystem.hpp +++ b/ingen/filesystem.hpp @@ -73,7 +73,9 @@ inline bool create_directories(const FilePath& path) inline FilePath current_path() { - std::unique_ptr cpath(realpath(".", NULL)); + struct Freer { void operator()(char* const ptr) { free(ptr); } }; + + std::unique_ptr cpath(realpath(".", NULL)); const FilePath path(cpath.get()); return path; } -- cgit v1.2.1