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 committed Sep 25, 2024
1 parent c459019 commit cc9d846
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 cc9d846

Please sign in to comment.