fix footprint buffer free function