we need to free the array _after_ releasing the array entries