[Pkg-running-devel] [openambit] 100/131: Add call to `close()` to match `open()` introduced in 4799eab
Christian Perrier
bubulle at moszumanska.debian.org
Thu Jul 17 20:19:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bubulle pushed a commit to branch master
in repository openambit.
commit 83ee7452394fc1e69aa81058e1d50ff90fe32837
Author: Olaf Meeuwissen <olaf at member.fsf.org>
Date: Thu Mar 27 21:16:55 2014 +0900
Add call to `close()` to match `open()` introduced in 4799eab
---
src/libambit/libambit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libambit/libambit.c b/src/libambit/libambit.c
index 25c43bf..13b85b1 100644
--- a/src/libambit/libambit.c
+++ b/src/libambit/libambit.c
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <unistd.h>
/*
* Local definitions
@@ -156,6 +157,7 @@ ambit_object_t *libambit_detect(void)
int fd = 0;
if (path) fd = open (path, O_RDWR);
if (-1 == fd) error = errno;
+ else close (fd);
#endif
LOG_ERROR("Failed to open device \"%s (%s)\"", device->name, device->model);
LOG_ERROR("Reason: %s", (error ? strerror(error) : "Unknown"));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git
More information about the Pkg-running-devel
mailing list