From 2134228a7d8f14f0972a3526924d8cb4540b04c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 17 Oct 2015 14:37:50 +0200 Subject: [PATCH] gnu-maintenance: Fix file descriptor leak. * guix/gnu-maintenance.scm (official-gnu-packages): Close the port returned by FETCH. --- guix/gnu-maintenance.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ (define official-description "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."