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.
master
Camilla Löwy ago%!(EXTRA string=3 years)
parent 9c95cfb9f1
commit b386371f57
  1. 1
      README.md
  2. 1
      src/wl_window.c

@ -312,6 +312,7 @@ information on what to include when reporting a bug.
- [Wayland] Bugfix: `glfwPostEmptyEvent` sometimes had no effect (#1520,#1521)
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
`glfwGetClipboardString`
- [Wayland] Bugfix: Data source creation error would cause double free at termination
- [POSIX] Removed use of deprecated function `gettimeofday`
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)

@ -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,

Loading…
Cancel
Save