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.

(cherry picked from commit 990dc4b388)
This commit is contained in:
Camilla Löwy
2022-03-23 20:08:12 +01:00
parent f51ec79951
commit 75b27849f6
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1733,6 +1733,7 @@ static void dataSourceHandleSend(void* userData,
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unknown clipboard data source");
close(fd);
return;
}
@@ -1740,6 +1741,7 @@ static void dataSourceHandleSend(void* userData,
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Copy requested from an invalid string");
close(fd);
return;
}