[mutter] native: Actually close input device fds
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] native: Actually close input device fds
- Date: Wed, 5 Aug 2015 02:28:53 +0000 (UTC)
commit 7ce06928e24843c7f625616a526fa7bfc1e0bddb
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Jul 23 11:18:06 2015 +0800
native: Actually close input device fds
Don't only release it, also close the fd so that we don't leak it.
https://bugzilla.gnome.org/show_bug.cgi?id=752753
src/backends/native/meta-launcher.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 208bd89..410b69b 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -223,7 +223,7 @@ on_evdev_device_close (int fd,
if (!get_device_info_from_fd (fd, &major, &minor))
{
g_warning ("Could not get device info for fd %d: %m", fd);
- return;
+ goto out;
}
if (!login1_session_call_release_device_sync (self->session_proxy,
@@ -232,6 +232,9 @@ on_evdev_device_close (int fd,
{
g_warning ("Could not release device %d,%d: %s", major, minor, error->message);
}
+
+out:
+ close (fd);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]