Skip to content

Commit

Permalink
Revert "Fix random leak" (#3609)
Browse files Browse the repository at this point in the history
Fixes x11-kiosk crash when running on `mir:wayland`

(It looks like any use if the `mir:wayland` platform would fail)
  • Loading branch information
Saviq authored Sep 24, 2024
2 parents 7ebe304 + 8cf9f4c commit 6d79e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platforms/wayland/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<char*>(template_filename.c_str());
auto const filename = strdup(template_filename.c_str());
mir::Fd const fd{mkostemp(filename, O_CLOEXEC)};
unlink(filename);
free(filename);
Expand Down

0 comments on commit 6d79e7e

Please sign in to comment.