perf tools: Fix resources leak in perfdataopendir()
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v6.0.19 by commit d89805f8fdedcf8efd645ff2e9d81d15a3b43313, it was introduced in version v5.1 by commit eb6176709b235b96511c7b4745c30412568395c7. For more details please see the references link.