libtraceevent: Fix memory leakage in copy_filter_type