mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +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.
(cherry picked from commit b386371f57
)
This commit is contained in:
parent
22f718dcf4
commit
53bd67ccfe
@ -131,6 +131,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791)
|
- [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791)
|
||||||
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
|
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
|
||||||
`glfwGetClipboardString`
|
`glfwGetClipboardString`
|
||||||
|
- [Wayland] Bugfix: Data source creation error would cause double free at termination
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -1817,6 +1817,7 @@ void _glfwPlatformSetClipboardString(const char* string)
|
|||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland: Impossible to create clipboard source");
|
"Wayland: Impossible to create clipboard source");
|
||||||
free(_glfw.wl.clipboardSendString);
|
free(_glfw.wl.clipboardSendString);
|
||||||
|
_glfw.wl.clipboardSendString = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wl_data_source_add_listener(_glfw.wl.dataSource,
|
wl_data_source_add_listener(_glfw.wl.dataSource,
|
||||||
|
Loading…
Reference in New Issue
Block a user