diff --git a/contrib/scripts/astcli b/contrib/scripts/astcli
index 635de5841749d4caf3438d14e16d9f1e29bae108..ed942eeed02e080ea539fe35bed9c24248053b10 100755
--- a/contrib/scripts/astcli
+++ b/contrib/scripts/astcli
@@ -80,6 +80,7 @@ sub process_credentials {
 		(undef,$host) = split(/[,=]/, $_) if $_ =~ /host(name)?[,=]/i;
 		(undef,$port) = split(/[,=]/, $_) if $_ =~ /port(num|no)?[,=]/i;
 	}
+	close ($fh);
 }
 
 sub usage {