Optimize the five_filter

Release the invalid pointer.