manager: fix memory leak in manager_add_filter function