Wayland: Fix error paths not closing sending fd

Whatever error happens on our end, we should still close the fd so the
other end can move on.
This commit is contained in:
Camilla Löwy
2022-03-23 20:08:12 +01:00
parent a4460b694e
commit 990dc4b388
2 changed files with 3 additions and 0 deletions

View File

@@ -1599,6 +1599,7 @@ static void dataSourceHandleSend(void* userData,
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unknown clipboard data source");
close(fd);
return;
}
@@ -1606,6 +1607,7 @@ static void dataSourceHandleSend(void* userData,
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Copy requested from an invalid string");
close(fd);
return;
}