lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1410974157-12470-1-git-send-email-valentin.ilie@gmail.com>
Date:	Wed, 17 Sep 2014 20:15:57 +0300
From:	Valentin Ilie <valentin.ilie@...il.com>
To:	rdunlap@...radead.org, davem@...emloft.net, minipli@...glemail.com
Cc:	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Valentin Ilie <valentin.ilie@...il.com>
Subject: [PATCH] connector - documentation: close opened file descriptor

For the logging process, we use either a file or stdout.

In the case of a file, we need to fix that by calling fclose at the right time.
In the case we end up calling fclose to stdout, we will not impact the program because we do it at its very end.

Signed-off-by: Valentin Ilie <valentin.ilie@...il.com>
---
 Documentation/connector/ucon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
index 8a4da64..f9d785b 100644
--- a/Documentation/connector/ucon.c
+++ b/Documentation/connector/ucon.c
@@ -246,5 +246,6 @@ int main(int argc, char *argv[])
 	}
 
 	close(s);
+	fclose(out);
 	return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ