matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Missing defer on file operations in PGP key loading

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug PGP key loading processes multiple files in loop without proper cleanup. Files accumulate until function exit.

To reproduce

  1. Load many PGP keys from directory
  2. File handles not closed per iteration
  3. Resource exhaustion with many keys

Expected behavior Close file immediately after read, not deferred to function exit

Matcha version master

OS All

Additional context File: fetcher/idle.go line 385 Defer in loop anti-pattern

andrinoff avatar Apr 21 '26 14:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 22 '26 06:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar Jun 04 '26 19:06 floatpanebot