aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-17 14:37:50 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-17 14:42:07 +0200
commit2134228a7d8f14f0972a3526924d8cb4540b04c2 (patch)
tree13554b63628ea35f5d4197c2934679ddb40e8719
parent9aec35d265a8f37d8bfe47d5b2baa701c8f03009 (diff)
downloadpatches-2134228a7d8f14f0972a3526924d8cb4540b04c2.tar
patches-2134228a7d8f14f0972a3526924d8cb4540b04c2.tar.gz
gnu-maintenance: Fix file descriptor leak.
* guix/gnu-maintenance.scm (official-gnu-packages): Close the port returned by FETCH.
-rw-r--r--guix/gnu-maintenance.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 920aae2173..e09df4b3ef 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -161,7 +161,10 @@ to fetch the list of GNU packages over HTTP."
"doc-url"
"download-url")
'("doc-url" "language"))))
- (read-records (fetch %package-list-url #:text? #t))))
+ (let* ((port (fetch %package-list-url #:text? #t))
+ (lst (read-records port)))
+ (close-port port)
+ lst)))
(define (find-packages regexp)
"Find GNU packages which satisfy REGEXP."