There seems to be a memory leak in bash when a local array is declared
within a function.
I also tested this on "GNU bash, version 5.0.17(1)-release
(x86_64-redhat-linux-gnu)" and that one works without any leaks.
Repeat-By:
#!/bin/bash
leak() { local arr=("leak"); }
while :; do leak; done