diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-23 01:49:29 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-23 01:49:29 +0200 |
| commit | 9b7751103e7985c9184b41d89d8454249ed36875 (patch) | |
| tree | e06140bfa00b6a5660a13a3403bf97ce31094af3 | |
| parent | ed3fb61cea1c3c33c423690b768adbde7a0fad8c (diff) | |
Fix file descriptor leak for the top-level Kconfig file
Needs to be close()d. The other Kconfig files are close()d in
_leave_file().
Could drop the reference somehow too, but an explicit close() is best
for PyPy, which doesn't do reference counting.
| -rw-r--r-- | kconfiglib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 76853ea..3b4e8d7 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -782,6 +782,9 @@ class Kconfig(object): except UnicodeDecodeError as e: _decoding_error(e, self._filename) + # Close the top-level Kconfig file + self._file.close() + self.top_node.list = self.top_node.next self.top_node.next = None |
