From 2a344e1d2c227a19737e0bd50d2fd1a96f10faad Mon Sep 17 00:00:00 2001 From: Sviatoslav Chagaev Date: Tue, 10 Sep 2013 18:13:06 +0300 Subject: [PATCH] Fix a file descriptor leak. Fix a file descriptor not being closed when an error codepath is taken. --- dbus/dbus-sysdeps-util-unix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 631c199..0d8a66c 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -1157,6 +1157,7 @@ _dbus_command_for_pid (unsigned long pid, "Failed to read from \"%s\": %s", _dbus_string_get_const_data (&path), _dbus_strerror (errno)); + _dbus_close (fd, NULL); goto fail; } -- 1.8.3.1