diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2015-07-23 11:18:06 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2015-08-05 10:28:15 +0800 |
commit | 7ce06928e24843c7f625616a526fa7bfc1e0bddb (patch) | |
tree | 9166f348651a890cee29ab4a77c39839a58ca05b | |
parent | ac79988939b3f1ed3497c3ddc69809a73d6e2b53 (diff) | |
download | mutter-7ce06928e24843c7f625616a526fa7bfc1e0bddb.tar.gz |
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
-rw-r--r-- | 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 208bd894c..410b69b3b 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 |