free memory if mid-return