Update filter.php

Fix memory leak due to create function - fix courtesy Tim Hunt