Fix warning.  Arranged so that filtered_type always needs to be freed, but not yet rearranged to fix the inevitable leak
Fix an obvious mistaken argument to memset()
This comparison was certainly meant to be an assignment
Fix warning.  Arranged so that filtered_type always needs to be freed, but not yet rearranged to fix the inevitable leak