filterelement: Fix memory leak on tests

Change-Id: I5a65073ec909d3308bb944c7d2dfea491d8d7737