#1111955 bash-completion: dh_bash-completion leaks file descriptors

#1111955#5
Date:
2025-08-24 09:32:14 UTC
From:
To:
Hi,


The `is_filelist` opens a file with handle `DH_FILE`. This is never
closed again, meaning it remains open. In this case, I recommend using:

```
	open (my $fd, '<', $file) || error("cannot read $file: $!");

	while (<$fd>) {
```

This would create a lexical scoped variable meaning perl will know it
can clean it up at the end of the lexical scope. Explicit closing before
`return` would be even better on top of this.

Best regards,
Niels