[PATCH 1/2] Don't close file descriptor twice

Thomas Jarosch thomas.jarosch at intra2net.com
Wed Oct 5 13:14:46 PDT 2011


Detected by "cppcheck"

Please CC: comments.

Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
---
 hald/linux/probing/probe-video4linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
index b055720..9faf009 100644
--- a/hald/linux/probing/probe-video4linux.c
+++ b/hald/linux/probing/probe-video4linux.c
@@ -147,6 +147,7 @@ main (int argc, char *argv[])
 	libhal_device_free_changeset (cset);
 
 	close (fd);
+	fd = 0;
 
 	ret = 0;
 
-- 
1.7.4.4



More information about the hal mailing list