mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Wayland: Fix double free on data source error
If data source creation fails, the string containing the data for it would be freed a second time during termination.
This commit is contained in:
@@ -1683,6 +1683,7 @@ void _glfwSetClipboardStringWayland(const char* string)
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Impossible to create clipboard source");
|
||||
_glfw_free(_glfw.wl.clipboardSendString);
|
||||
_glfw.wl.clipboardSendString = NULL;
|
||||
return;
|
||||
}
|
||||
wl_data_source_add_listener(_glfw.wl.dataSource,
|
||||
|
||||
Reference in New Issue
Block a user