From cc723a46f7a3c578fededd91de98992cf1aa0196 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 5 May 2008 12:43:43 +0000 Subject: [PATCH] Close device file before we exit. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5238 7894878c-1315-0410-8ee3-d5d059ff63e0 --- tools/i2cget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/i2cget.c b/tools/i2cget.c index 90dc271..1631fa8 100644 --- a/tools/i2cget.c +++ b/tools/i2cget.c @@ -228,6 +228,7 @@ int main(int argc, char *argv[]) if (pec && ioctl(file, I2C_PEC, 1) < 0) { fprintf(stderr, "Error: Could not set PEC: %s\n", strerror(errno)); + close(file); exit(1); }