From 8cf9f4caa5e3cd3de641c6a1fc97db924a81ddee Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Tue, 24 Sep 2024 17:29:22 +0100 Subject: [PATCH] Revert "Fix random leak" This reverts commit 864371bb8ac5b734b850700813b55f35b768d18d. --- src/platforms/wayland/cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/wayland/cursor.cpp b/src/platforms/wayland/cursor.cpp index e4eda7d8f0f..1c0d589d1c5 100644 --- a/src/platforms/wayland/cursor.cpp +++ b/src/platforms/wayland/cursor.cpp @@ -41,7 +41,7 @@ struct wl_shm_pool* make_shm_pool(struct wl_shm* shm, int size, void **data) static auto const template_filename = std::string{getenv("XDG_RUNTIME_DIR")} + "/wayland-cursor-shared-XXXXXX"; - char* const filename = const_cast(template_filename.c_str()); + auto const filename = strdup(template_filename.c_str()); mir::Fd const fd{mkostemp(filename, O_CLOEXEC)}; unlink(filename); free(filename);