Fix memory leaks in the array support header