[pkg-d-commits] [ldc] 33/95: Close config file properly after reading

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:53:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.

commit e53c669bc80ae59a9cef2f93195860c95af52127
Author: Martin <noone at nowhere.com>
Date:   Sun Feb 26 03:35:01 2017 +0100

    Close config file properly after reading
---
 driver/config.d | 1 +
 1 file changed, 1 insertion(+)

diff --git a/driver/config.d b/driver/config.d
index 8639f66..637fd97 100644
--- a/driver/config.d
+++ b/driver/config.d
@@ -116,6 +116,7 @@ Setting[] parseConfigFile(const(char)* filename)
     auto content = new char[fileLength];
     const numRead = fread(content.ptr, 1, fileLength, file);
     content = content[0 .. numRead];
+    fclose(file);
 
     auto parser = new Parser(cast(string) content, dFilename);
     return parser.parseConfig();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list